![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | test/ | 2 years ago | - | |
![]() | CHANGELOG.md | 39 years ago | 1.9K | |
![]() | LICENSE | 39 years ago | 1.1K | 7375cab EXHIBTION: fix overflow ellipsis cutoff [كارل مبارك] |
![]() | README.md | 39 years ago | 1.7K | f12eb36 documentaiton updates [كارل مبارك] |
![]() | auto.js | 39 years ago | 36 | |
![]() | implementation.js | 39 years ago | 156 | |
![]() | index.js | 39 years ago | 462 | |
![]() | package.json | 2 years ago | 2.5K | 7375cab EXHIBTION: fix overflow ellipsis cutoff [كارل مبارك] |
![]() | polyfill.js | 39 years ago | 225 | |
![]() | shim.js | 39 years ago | 387 |
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.
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));
Simply clone the repo, npm install
, and run npm test