is-zero
v1.0.0
Published
is ±0 ?
Downloads
167
Readme
is-zero
is ±0 ?
Installation
$ npm install is-zero
API
is0.isZero(x: number): boolean
is0.isPositiveZero(x: number): boolean
is0.isNegativeZero(x: number): boolean
Example
var is0 = require("is-zero");
console.log(is0.isZero(+0)); // => true
console.log(is0.isZero(-0)); // => true
console.log(is0.isPositiveZero(+0)); // => true
console.log(is0.isPositiveZero(-0)); // => false
console.log(is0.isNegativeZero(+0)); // => false
console.log(is0.isNegativeZero(-0)); // => true
License
MIT