You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
306 B
15 lines
306 B
|
2 months ago
|
"use strict";
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Returns `true` when `value` is `-0`
|
||
|
|
*
|
||
|
|
* @alias module:samsam.isNegZero
|
||
|
|
* @param {*} value A value to examine
|
||
|
|
* @returns {boolean} Returns `true` when `value` is `-0`
|
||
|
|
*/
|
||
|
|
function isNegZero(value) {
|
||
|
|
return value === 0 && 1 / value === -Infinity;
|
||
|
|
}
|
||
|
|
|
||
|
|
module.exports = isNegZero;
|