smart-power-ui/node_modules/is-nan
23688nl 7a6d58607a 提交代码 2021-05-14 17:26:11 +08:00
..
.github 提交代码 2021-05-14 17:26:11 +08:00
test 提交代码 2021-05-14 17:26:11 +08:00
.eslintignore 提交代码 2021-05-14 17:26:11 +08:00
.eslintrc 提交代码 2021-05-14 17:26:11 +08:00
.nycrc 提交代码 2021-05-14 17:26:11 +08:00
CHANGELOG.md 提交代码 2021-05-14 17:26:11 +08:00
LICENSE 提交代码 2021-05-14 17:26:11 +08:00
README.md 提交代码 2021-05-14 17:26:11 +08:00
auto.js 提交代码 2021-05-14 17:26:11 +08:00
implementation.js 提交代码 2021-05-14 17:26:11 +08:00
index.js 提交代码 2021-05-14 17:26:11 +08:00
package.json 提交代码 2021-05-14 17:26:11 +08:00
polyfill.js 提交代码 2021-05-14 17:26:11 +08:00
shim.js 提交代码 2021-05-14 17:26:11 +08:00

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