moroshko / shallow-equal

Minimalistic shallow equality check for arrays/objects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update shallow equal objects

ematipico opened this issue · comments

I would to request to update the shallow equal for objects with the following one

https://github.com/reactjs/react-redux/blob/master/src/utils/shallowEqual.js

React-redux guys update it recently in order to use the shallowEqual they use in fbjs. This piece of code also manages number cases

Could you describe the issue you are trying to solve, and provide a failing test please?

react-redux's implement actually uses the Object.is spec, the core difference is Object.is(0, -0) === false and Object.is(NaN, NaN) === true