same-value-zero.js 235 B

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