Urara-Blog/node_modules/.pnpm-store/v3/files/74/f51fb5d1dbc1eca3e0d056871a72bf3c64716e981732cbeef651c51a2ee4a903c3c007490e8459b0d1bafc075eb49eb99913c87a9015c7af12283369ca2da2
2022-08-14 01:14:53 +08:00

18 lines
411 B
Text

/*!
* 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;
};