Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set equality #46

Closed
jmakeig opened this issue Apr 4, 2017 · 2 comments
Closed

Set equality #46

jmakeig opened this issue Apr 4, 2017 · 2 comments

Comments

@jmakeig
Copy link

jmakeig commented Apr 4, 2017

On Node 6.9:

const deepEqual = require("deep-equal"); // v1.0.1
deepEqual(new Set(['a', 'b', 'c']), new Set(['a', 'b', 'c'])); // true
deepEqual(new Set(['a', 'b', 'X']), new Set(['a', 'b', 'c'])); // true

Two sets should not be equal unless their constituents are the same. (Probably the same issue with Map instances too.)

@leguma
Copy link

leguma commented Sep 12, 2019

Seconded. This lib cannot claim to be a replacement for a real deepEqual implementation without basic Map & Set support.

@ljharb
Copy link
Member

ljharb commented Sep 12, 2019

@leguma v1 of this lib dates from before Map and Set existed, so it is, in fact a "real" deepEqual implementation - it just hasn't yet caught up to node's evolution of assert.deepEqual.

ljharb added a commit to C-Saunders/node-deep-equal that referenced this issue Dec 1, 2019
@ljharb ljharb closed this as completed in 47eb288 Dec 1, 2019
ljharb added a commit that referenced this issue Dec 1, 2019
…ssert

Merge pull request #52 from C-Saunders/map_value_equality

Fixes #54. Fixes #46.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants