| var isNumber = require('./isNumber'); |
| * Checks if `value` is `NaN`. |
| * **Note:** This method is based on |
| * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as |
| * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for |
| * `undefined` and other non-number values. |
| * @param {*} value The value to check. |
| * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. |
| * _.isNaN(new Number(NaN)); |
| // An `NaN` primitive is the only value that is not equal to itself. |
| // Perform the `toStringTag` check first to avoid errors with some |
| // ActiveX objects in IE. |
| return isNumber(value) && value != +value; |