mirror of
https://github.com/crazy-max/ghaction-upx.git
synced 2024-11-22 18:36:09 -07:00
19 lines
411 B
JavaScript
19 lines
411 B
JavaScript
|
/*!
|
||
|
* is-number <https://github.com/jonschlinkert/is-number>
|
||
|
*
|
||
|
* Copyright (c) 2014-present, Jon Schlinkert.
|
||
|
* Released under the MIT License.
|
||
|
*/
|
||
|
|
||
|
'use strict';
|
||
|
|
||
|
module.exports = function(num) {
|
||
|
if (typeof num === 'number') {
|
||
|
return num - num === 0;
|
||
|
}
|
||
|
if (typeof num === 'string' && num.trim() !== '') {
|
||
|
return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
|
||
|
}
|
||
|
return false;
|
||
|
};
|