source: node_modules/is-number/index.js@ 62b2964

finki-main main
Last change on this file since 62b2964 was 81bc7da, checked in by Klimentina Efremova <klimentina08642@…>, 3 months ago

Initial commit

  • Property mode set to 100644
File size: 411 bytes
RevLine 
[81bc7da]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
8'use strict';
9
10module.exports = function(num) {
11 if (typeof num === 'number') {
12 return num - num === 0;
13 }
14 if (typeof num === 'string' && num.trim() !== '') {
15 return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
16 }
17 return false;
18};
Note: See TracBrowser for help on using the repository browser.