Object.is
-like function.
$ npm install bloody-is
var is = require("bloody-is")
like a ===
comparison with the exception that :
- comparing
NaN
withNaN
will returntrue
. - comparing
+0
with-0
will returnfalse
is(NaN, NaN) // true
is(+0, -0) // false
is("foo", "foo") // true
is({}, {}) // false