3 ms·
Object.is is a very silly addition to the language. It does the same thing as === except in the case of NaN and positive/negative zero. I mean if you read a po
by serve_yay 12y ago
Object.is is a very silly addition to the language. It does the same thing as === except in the case of NaN and positive/negative zero.
I mean if you read a polyfill for it, it's such a silly bit of "functionality". And of course the name is terrible. Argh.
- ender7 12y agoThe new Map and WeakMap classes use Object.is() to determine if two keys are the same (otherwise it would be impossible to use NaN as a key to a map). Whether this algorithm should have been exposed to users is debatable, but it exists for a good reason.