Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Leon de Rijke committed May 20, 2014
1 parent d56251c commit 283a1e5
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,43 @@
# ES6 `Number.isNaN` polyfill

A polyfill for [the `Number.isNaN` method in ECMAScript 6](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isnan).

Other polyfills for `Number.isNaN` are available:

* <https://github.com/ljharb/is-nan> by [Jordan Harband](https://twitter.com/ljharb)
* <https://github.com/paulmillr/es6-shim/blob/0.10.1/es6-shim.js#L726-L733> by [Paul Miller](http://paulmillr.com/)

## Installation

In a browser:

```html
<script src="isnan.js"></script>
```

Via [npm](http://npmjs.org/):

```bash
npm install number.isnan
```

Then, in [Node.js](http://nodejs.org/):

```js
require('number.isnan');

// On Windows and on Mac systems with default settings, case doesn’t matter,
// which allows you to do this instead:
require('Number.isNaN');
```

## Relevant links

* https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isnan
* http://wiki.ecmascript.org/doku.php?id=harmony:number.isnan
* http://ariya.ofilabs.com/2014/05/the-curious-case-of-javascript-nan.html
* http://www.2ality.com/2012/02/nan-infinity.html

## License

MIT License

0 comments on commit 283a1e5

Please sign in to comment.