Sha256: 02b79d3d7a214e4116baaf3ed968e8b234402f60c6bfa8e4c6751d76ec5553df

Contents?: true

Size: 825 Bytes

Versions: 153

Compression:

Stored size: 825 Bytes

Contents

var isNumber = require('./isNumber');

/**
 * Checks if `value` is `NaN`.
 *
 * **Note:** This method is not the same as [`isNaN`](https://es5.github.io/#x15.1.2.4)
 * which returns `true` for `undefined` and other non-numeric values.
 *
 * @static
 * @memberOf _
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
 * @example
 *
 * _.isNaN(NaN);
 * // => true
 *
 * _.isNaN(new Number(NaN));
 * // => true
 *
 * isNaN(undefined);
 * // => true
 *
 * _.isNaN(undefined);
 * // => false
 */
function isNaN(value) {
  // An `NaN` primitive is the only value that is not equal to itself.
  // Perform the `toStringTag` check first to avoid errors with some host objects in IE.
  return isNumber(value) && value != +value;
}

module.exports = isNaN;

Version data entries

153 entries across 80 versions & 8 rubygems

Version Path
ilog-0.4.1 node_modules/contents/node_modules/lodash/lang/isNaN.js
ilog-0.4.1 node_modules/babel-plugin-proto-to-assign/node_modules/lodash/lang/isNaN.js
ilog-0.4.1 node_modules/babel/node_modules/lodash/lang/isNaN.js
ilog-0.4.0 node_modules/babel/node_modules/lodash/lang/isNaN.js
ilog-0.4.0 node_modules/contents/node_modules/lodash/lang/isNaN.js
ilog-0.4.0 node_modules/babel-plugin-proto-to-assign/node_modules/lodash/lang/isNaN.js
ilog-0.3.3 node_modules/babel/node_modules/lodash/lang/isNaN.js
ilog-0.3.3 node_modules/contents/node_modules/lodash/lang/isNaN.js
ilog-0.3.3 node_modules/babel-plugin-proto-to-assign/node_modules/lodash/lang/isNaN.js
trusty-festivity-extension-2.6.3 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/isNaN.js
trusty-festivity-extension-2.6.3 node_modules/bower/node_modules/inquirer/node_modules/lodash/lang/isNaN.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/isNaN.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/inquirer/node_modules/lodash/lang/isNaN.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/isNaN.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/inquirer/node_modules/lodash/lang/isNaN.js
xcodebuild-helper-1.2.5 externals/ios-sim-master/node_modules/lodash/lang/isNaN.js
trusty-festivity-extension-2.6 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/isNaN.js
trusty-festivity-extension-2.6 node_modules/bower/node_modules/inquirer/node_modules/lodash/lang/isNaN.js
trusty-festivity-extension-2.5.19 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/isNaN.js
trusty-festivity-extension-2.5.19 node_modules/bower/node_modules/inquirer/node_modules/lodash/lang/isNaN.js