#
whycq
2023-09-19 24b3bdf4cd46e85cdfa4470eef70b36262a51012
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*!
 * 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;
};