UNPKG

negative-zero

Version:
42 lines (22 loc) 535 B
Deprecated. Just use `Object(number, -0)`. --- # negative-zero > Check if a number is [negative zero](https://en.wikipedia.org/wiki/Signed_zero) ## Install ``` $ npm install negative-zero ``` ## Usage ```js const negativeZero = require('negative-zero'); negativeZero(-0); //=> true negativeZero(0); //=> false negativeZero(+0); //=> false ``` ## Related - [positive-zero](https://github.com/sindresorhus/positive-zero) - Check if a number is positive zero ## License MIT © [Sindre Sorhus](https://sindresorhus.com)