mirror of
https://github.com/nodejs/node.git
synced 2025-05-18 20:53:29 +00:00

PR-URL: https://github.com/nodejs/io.js/pull/2286 Reviewed-By: Roman Reiss <me@silverwind.io>
31 lines
597 B
Markdown
31 lines
597 B
Markdown
# number-is-nan [](https://travis-ci.org/sindresorhus/number-is-nan)
|
|
|
|
> ES6 [`Number.isNaN()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN) ponyfill
|
|
|
|
> Ponyfill: A polyfill that doesn't overwrite the native method
|
|
|
|
|
|
## Install
|
|
|
|
```
|
|
$ npm install --save number-is-nan
|
|
```
|
|
|
|
|
|
## Usage
|
|
|
|
```js
|
|
var numberIsNan = require('number-is-nan');
|
|
|
|
numberIsNan(NaN);
|
|
//=> true
|
|
|
|
numberIsNan('unicorn');
|
|
//=> false
|
|
```
|
|
|
|
|
|
## License
|
|
|
|
MIT © [Sindre Sorhus](http://sindresorhus.com)
|