2.0.3 • Published 2 months ago

is-negative-zero v2.0.3

Weekly downloads
12,318,803
License
MIT
Repository
github
Last release
2 months ago

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

es-abstractff-antd-vuearchetype-libraryeasy-select-rnvuedragdropuploadimagesdcxt-design-xue-xant-mstant-masterreact-native-bluetooth2react-native-template-rfbaseairscanairscan-examplexhn-design-vuezyd-design-vueant-design-vue-xuexueant-design-vue-xxxue-dev-new-xant-design-vue-xxxxue-dev-new2react-native-esc-pos-sahaabgrowth-antd-webant-design-vue-lap@borisovart/atol-kkt-module@frxf/frxf@phil8795/pecuniarius-apivue-ant-patterns-cicddeneme323112mio-design-vue@fundefund/funde_ck@ntt_app/react-native-custom-notificationreact-native-covid-sdkgql_din_modafryxiconsmutasi-bcaant-design-vue-ysb@jttechnic/interpreter@askme-inc/ant-design-vue@saeon/quick-formcthpb-plugin-socialreact-native-printer-brothersreact-native-shekhar-bridge-testcogoportutilsuncoded-connecttest-ant-design-vuewilscanner@khalitovadel/abstract-repository@oiti/documentoscopy-react-nativequoc-testrun-design-vue2react-native-slider-kf@infinitebrahmanuniverse/nolb-is-ncfbgc-components@saaspe/componentstest-schh-uiexpand-react-bridgeopea-bootstraapluminos-ui-corex-intelligent-uisklif-ui-kitsklif-api@everything-registry/sub-chunk-1934jawwy-sdkjawwy_gamification_releasesnbc-paas-ui@deepakorg/test@deepak757/testant-design-vue-zxkjreact-native-sphereuisphereuicpaas-uijawwy_libraryreact-native-credit-card-pkgp149-tablesklif-uimachinebeemrcapsreact-native-jawwy_sampleparse-large-msparvan_componentsparvan_reactjs_componentspickupbiz-npm-packagepeachmelovers29pedrosaletme22payutestingpdm-antd-vuepixelpioneerplugn-devicepensions_jordimrpetengpjtools-map-vuepl-vue-antdpizza-teapixiu-swap-corepixiuswap-libs-sdkpopoqpolospolen-web-components-reactppfishppfish-forkprastianhd
2.0.3

2 months ago

2.0.2

2 years ago

2.0.1

3 years ago

2.0.0

9 years ago

1.0.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.0

10 years ago