prc b6c02717e6 Upload complete no-internet building environment. | 1 年之前 | |
---|---|---|
.. | ||
.github | 1 年之前 | |
test | 1 年之前 | |
.editorconfig | 1 年之前 | |
.eslintignore | 1 年之前 | |
.eslintrc | 1 年之前 | |
.nycrc | 1 年之前 | |
CHANGELOG.md | 1 年之前 | |
LICENSE | 1 年之前 | |
README.md | 1 年之前 | |
index.js | 1 年之前 | |
package.json | 1 年之前 |
Is this value negative zero? === will lie to you.
var isNegativeZero = require('is-negative-zero');
var assert = require('assert');
assert.notOk(isNegativeZero(undefined));
assert.notOk(isNegativeZero(null));
assert.notOk(isNegativeZero(false));
assert.notOk(isNegativeZero(true));
assert.notOk(isNegativeZero(0));
assert.notOk(isNegativeZero(42));
assert.notOk(isNegativeZero(Infinity));
assert.notOk(isNegativeZero(-Infinity));
assert.notOk(isNegativeZero(NaN));
assert.notOk(isNegativeZero('foo'));
assert.notOk(isNegativeZero(function () {}));
assert.notOk(isNegativeZero([]));
assert.notOk(isNegativeZero({}));
assert.ok(isNegativeZero(-0));
Simply clone the repo, npm install
, and run npm test