Bakhtina Sofya b84cb877be 1st comm | 2 veckor sedan | |
---|---|---|
.. | ||
.github | 2 veckor sedan | |
test | 2 veckor sedan | |
.editorconfig | 2 veckor sedan | |
.eslintrc | 2 veckor sedan | |
.nycrc | 2 veckor sedan | |
CHANGELOG.md | 2 veckor sedan | |
LICENSE | 2 veckor sedan | |
README.md | 2 veckor sedan | |
index.d.ts | 2 veckor sedan | |
index.js | 2 veckor sedan | |
package.json | 2 veckor sedan | |
tsconfig.json | 2 veckor sedan |
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