package
ES2015-compliant shim for Number.isNaN - the global isNaN returns false positives.
npm install is-nanGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
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(
Simply clone the repo, npm install, and run npm test
Estimated unpacked size across 17 packages.
306.3 kB
Includes dependencies.