Sha256: 08b51e5b85fb219abac77b8096033d4365134ef980090878625d2950db6b0842
Contents?: true
Size: 581 Bytes
Versions: 69
Compression:
Stored size: 581 Bytes
Contents
/** * Check if both arguments are egal. */ function is(x, y){ // implementation borrowed from harmony:egal spec if (x === y) { // 0 === -0, but they are not identical return x !== 0 || 1 / x === 1 / y; } // NaN !== NaN, but they are identical. // NaNs are the only non-reflexive value, i.e., if x !== x, // then x is a NaN. // isNaN is broken: it converts its argument to number, so // isNaN("foo") => true return x !== x && y !== y; } module.exports = is;
Version data entries
69 entries across 69 versions & 2 rubygems