is-neg-zero.js 229 B

12345678910111213
  1. "use strict";
  2. /**
  3. * @name samsam.isNegZero
  4. * @param Object value
  5. *
  6. * Returns ``true`` if ``value`` is ``-0``.
  7. */
  8. function isNegZero(value) {
  9. return value === 0 && 1 / value === -Infinity;
  10. }
  11. module.exports = isNegZero;