f51fb5d1dbc1eca3e0d056871a72bf3c64716e981732cbeef651c51a2ee4a903c3c007490e8459b0d1bafc075eb49eb99913c87a9015c7af12283369ca2da2 411 B

123456789101112131415161718
  1. /*!
  2. * is-number <https://github.com/jonschlinkert/is-number>
  3. *
  4. * Copyright (c) 2014-present, Jon Schlinkert.
  5. * Released under the MIT License.
  6. */
  7. 'use strict';
  8. module.exports = function(num) {
  9. if (typeof num === 'number') {
  10. return num - num === 0;
  11. }
  12. if (typeof num === 'string' && num.trim() !== '') {
  13. return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
  14. }
  15. return false;
  16. };