UNPKG

moltres-utils

Version:
44 lines (38 loc) 1.22 kB
"use strict"; require("core-js/modules/es6.object.define-property"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _isNumber = _interopRequireDefault(require("./isNumber")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * 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. * * @function * @since v0.0.13 * @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) * // => false */ var isNaN = 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 // ActiveX objects in IE. return (0, _isNumber.default)(value) && value != +value; }; var _default = isNaN; exports.default = _default; //# sourceMappingURL=isNaN.js.map