astro-ghostcms/.pnpm-store/v3/files/74/f51fb5d1dbc1eca3e0d056871a7...

19 lines
411 B
Plaintext
Raw Normal View History

2024-02-14 14:10:47 +00:00
/*!
* 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;
};