is-zero

1.0.0 • Public • Published

is-zero

Build Status NPM Version License

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

Readme

Keywords

none

Package Sidebar

Install

npm i is-zero

Weekly Downloads

7

Version

1.0.0

License

MIT

Last publish

Collaborators

  • mohayonao