same-value.js 248 B

123456
  1. // `SameValue` abstract operation
  2. // https://tc39.github.io/ecma262/#sec-samevalue
  3. module.exports = Object.is || function is(x, y) {
  4. // eslint-disable-next-line no-self-compare
  5. return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
  6. };