This repository has been archived on 2020-11-02. You can view files and clone it, but cannot push or open issues or pull requests.
TripSit_Suite/node_modules/@sinonjs/samsam/lib/is-neg-zero.js

15 lines
306 B
JavaScript
Raw Permalink Normal View History

"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;