same-value-zero.js 219 B

123456
  1. // `SameValueZero` abstract operation
  2. // https://tc39.es/ecma262/#sec-samevaluezero
  3. module.exports = function (x, y) {
  4. // eslint-disable-next-line no-self-compare -- NaN check
  5. return x === y || x != x && y != y;
  6. };