is.js 250 B

12345678910
  1. // Implementation credits go to:
  2. // http://wiki.ecmascript.org/doku.php?id=harmony:egal
  3. 'use strict';
  4. module.exports = function (x, y) {
  5. return (x === y) ?
  6. ((x !== 0) || ((1 / x) === (1 / y))) :
  7. ((x !== x) && (y !== y)); //jslint: ignore
  8. };