mirror-rhinstaller-node-cache/is-negative-zero
2026-07-21 07:31:32 +00:00
..
test dc62fd92941924495660734286311a3d44d6e15c919694aab2b00ce84bf0c990 package.json 2026-07-21 07:31:32 +00:00
.editorconfig dc62fd92941924495660734286311a3d44d6e15c919694aab2b00ce84bf0c990 package.json 2026-07-21 07:31:32 +00:00
.eslintrc dc62fd92941924495660734286311a3d44d6e15c919694aab2b00ce84bf0c990 package.json 2026-07-21 07:31:32 +00:00
.nycrc dc62fd92941924495660734286311a3d44d6e15c919694aab2b00ce84bf0c990 package.json 2026-07-21 07:31:32 +00:00
CHANGELOG.md dc62fd92941924495660734286311a3d44d6e15c919694aab2b00ce84bf0c990 package.json 2026-07-21 07:31:32 +00:00
index.d.ts dc62fd92941924495660734286311a3d44d6e15c919694aab2b00ce84bf0c990 package.json 2026-07-21 07:31:32 +00:00
index.js dc62fd92941924495660734286311a3d44d6e15c919694aab2b00ce84bf0c990 package.json 2026-07-21 07:31:32 +00:00
LICENSE dc62fd92941924495660734286311a3d44d6e15c919694aab2b00ce84bf0c990 package.json 2026-07-21 07:31:32 +00:00
package.json dc62fd92941924495660734286311a3d44d6e15c919694aab2b00ce84bf0c990 package.json 2026-07-21 07:31:32 +00:00
README.md dc62fd92941924495660734286311a3d44d6e15c919694aab2b00ce84bf0c990 package.json 2026-07-21 07:31:32 +00:00
tsconfig.json dc62fd92941924495660734286311a3d44d6e15c919694aab2b00ce84bf0c990 package.json 2026-07-21 07:31:32 +00:00

is-negative-zero Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Is this value negative zero? === will lie to you.

Example

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));

Tests

Simply clone the repo, npm install, and run npm test