CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes45downloads
isNaN.js39 linesDownload Raw Back to lodash
1var isNumber = require('./isNumber');2 3/**4 * Checks if `value` is `NaN`.5 *6 * **Note:** This method is based on7 * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as8 * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for9 * `undefined` and other non-number values.10 *11 * @static12 * @memberOf _13 * @since 0.1.014 * @category Lang15 * @param {*} value The value to check.16 * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.17 * @example18 *19 * _.isNaN(NaN);20 * // => true21 *22 * _.isNaN(new Number(NaN));23 * // => true24 *25 * isNaN(undefined);26 * // => true27 *28 * _.isNaN(undefined);29 * // => false30 */31function isNaN(value) {32  // An `NaN` primitive is the only value that is not equal to itself.33  // Perform the `toStringTag` check first to avoid errors with some34  // ActiveX objects in IE.35  return isNumber(value) && value != +value;36}37 38module.exports = isNaN;39 
basant307/AI_Governance_Project · CoolFace