Mohammad Asif cf937194cb Removed un-waned things 1. il y a 5 mois
..
.github cf937194cb Removed un-waned things 1. il y a 5 mois
test cf937194cb Removed un-waned things 1. il y a 5 mois
.eslintignore cf937194cb Removed un-waned things 1. il y a 5 mois
.eslintrc cf937194cb Removed un-waned things 1. il y a 5 mois
.nycrc cf937194cb Removed un-waned things 1. il y a 5 mois
CHANGELOG.md cf937194cb Removed un-waned things 1. il y a 5 mois
LICENSE cf937194cb Removed un-waned things 1. il y a 5 mois
README.md cf937194cb Removed un-waned things 1. il y a 5 mois
auto.js cf937194cb Removed un-waned things 1. il y a 5 mois
implementation.js cf937194cb Removed un-waned things 1. il y a 5 mois
index.js cf937194cb Removed un-waned things 1. il y a 5 mois
package.json cf937194cb Removed un-waned things 1. il y a 5 mois
polyfill.js cf937194cb Removed un-waned things 1. il y a 5 mois
shim.js cf937194cb Removed un-waned things 1. il y a 5 mois

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