|
|
%!s(int64=3) %!d(string=hai) anos | |
|---|---|---|
| .. | ||
| .github | %!s(int64=3) %!d(string=hai) anos | |
| test | %!s(int64=3) %!d(string=hai) anos | |
| .editorconfig | %!s(int64=3) %!d(string=hai) anos | |
| .eslintignore | %!s(int64=3) %!d(string=hai) anos | |
| .eslintrc | %!s(int64=3) %!d(string=hai) anos | |
| .nycrc | %!s(int64=3) %!d(string=hai) anos | |
| CHANGELOG.md | %!s(int64=3) %!d(string=hai) anos | |
| LICENSE | %!s(int64=3) %!d(string=hai) anos | |
| README.md | %!s(int64=3) %!d(string=hai) anos | |
| index.js | %!s(int64=3) %!d(string=hai) anos | |
| package.json | %!s(int64=3) %!d(string=hai) anos | |
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