Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
nitowa 1dae68b1c7 init il y a 1 an
..
.github init il y a 1 an
test init il y a 1 an
.eslintignore init il y a 1 an
.eslintrc init il y a 1 an
.nycrc init il y a 1 an
CHANGELOG.md init il y a 1 an
LICENSE init il y a 1 an
README.md init il y a 1 an
auto.js init il y a 1 an
implementation.js init il y a 1 an
index.js init il y a 1 an
package.json init il y a 1 an
polyfill.js init il y a 1 an
shim.js init il y a 1 an

README.md

is-nan Version Badge

dependency status dev dependency status License Downloads

npm badge

ES2015-compliant shim for Number.isNaN - the global isNaN returns false positives.

This package implements the es-shim API interface. It works in an ES3-supported environment and complies with the spec.

Example

Number.isNaN = require('is-nan');
var assert = require('assert');

assert.notOk(Number.isNaN(undefined));
assert.notOk(Number.isNaN(null));
assert.notOk(Number.isNaN(false));
assert.notOk(Number.isNaN(true));
assert.notOk(Number.isNaN(0));
assert.notOk(Number.isNaN(42));
assert.notOk(Number.isNaN(Infinity));
assert.notOk(Number.isNaN(-Infinity));
assert.notOk(Number.isNaN('foo'));
assert.notOk(Number.isNaN(function () {}));
assert.notOk(Number.isNaN([]));
assert.notOk(Number.isNaN({}));

assert.ok(Number.isNaN(NaN));

Tests

Simply clone the repo, npm install, and run npm test