Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

skava / exotic   js

Repository URL to install this package:

Version: 2.0.8 

/ src / types / primitive / number / check / isNaN.ts

import isNumber from './isNumber'

/**
 * Checks if `value` is `NaN`
 * @category Lang
 * @memberOf is
 * @since 5.0.0-beta.5
 *
 * @param  {*} x The value to check.
 * @return {boolean} x isNaN
 *
 * @name isNaN
 * @alias isNotNumber
 * @alias isNotEhNumber
 *
 * {@link https://tc39.github.io/ecma262/#sec-isnan-number emca-isnan}
 * {@link https://github.com/lodash/lodash/tree/npm-packages/lodash.isnan lodash-isnan}
 * {@link https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/isNaN mozilla-isnan}
 * {@link https://github.com/jashkenas/underscore/blob/master/underscore.js#L1347 underscore-is-nan}
 * @see {@link emca-isnan}
 * @see {@link mozilla-isnan}
 * @see {@link underscore-is-nan}
 * @see {@link lodash-isnan}
 * @see is/number
 * @see is/real
 *
 * @example
 *
 *  isNaN(Number(null)) //=> true
 *  isNaN(NaN) //=> true
 *
 *  isNaN(0) //=> false
 *  isNaN(Number(100)) //=> false
 *
 */
function isNaN(x: any) {
  return isNumber(x) && Number.isNaN(x)
}

export { isNaN, isNaN as isNotEhNumber }
export default isNaN