0.2.2 • Published 2 years ago

ekwal v0.2.2

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Compare things

npm install ekwal
import { ekwal } from 'ekwal';

if (ekwal(1,1)) {
  console.log('1 equals 1');
}
// NB: it also works with many other things

Amazing!

Compatibility

Numbers

Support edge cases involving NaN, +/-0 and +/-Infinity values!

ekwal(-Infinity, -Infinity) // => true
ekwal(NaN, NaN) // => true
ekwal(-0, -0) // => true
ekwal(-0, +0) // => false

Objects

ekwal({a: 1}, {a: 1}) // => true
ekwal({a: 1}, {a: 2}) // => false