epoberezkin / fast-deep-equal

The fastest deep equality check with Date, RegExp and ES6 Map, Set and typed arrays support
MIT License
1.86k stars 101 forks source link

Bug: Set compares by reference not value #137

Open Semigradsky opened 1 year ago

Semigradsky commented 1 year ago
const deepEqual = require('fast-deep-equal/es6')

deepEqual(
    new Set().add({ foo: 'bar' }),
    new Set().add({ foo: 'bar' }),
) // false

The same in react-fast-compare: https://github.com/FormidableLabs/react-fast-compare/issues/50