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

[Feature Request]: Support Maps in isDeepEqual #626

Closed
BuuBux opened this issue Apr 9, 2024 · 6 comments · Fixed by #637
Closed

[Feature Request]: Support Maps in isDeepEqual #626

BuuBux opened this issue Apr 9, 2024 · 6 comments · Fixed by #637
Labels
feature request New feature or request good first issue Good for newcomers released runtime Issues that refer to the runtime behavior

Comments

@BuuBux
Copy link

BuuBux commented Apr 9, 2024

Deprecated equals seems to have worked correctly with maps, I guess isDeepEqual as a successor should also support maps, for me it would be a really cool feature and essential.

@eranhirsch eranhirsch added feature request New feature or request typing Something type related runtime Issues that refer to the runtime behavior and removed typing Something type related labels Apr 9, 2024
@cjquines cjquines added the good first issue Good for newcomers label Apr 9, 2024
@cjquines
Copy link
Collaborator

cjquines commented Apr 9, 2024

i agree it should—do you want to send in a PR?

@BuuBux
Copy link
Author

BuuBux commented Apr 10, 2024

I'll try to do my best but no promises

@eranhirsch
Copy link
Collaborator

btw you mention that equals worked with Maps, but I don't think it ever did. It would simply return true for any 2 maps provided to it: https://codesandbox.io/p/sandbox/empty-cache-3tnrzs

eranhirsch added a commit that referenced this issue Apr 14, 2024
Add support for maps for the isDeepEqual function

Fixes: #626

---------

Co-authored-by: Eran Hirsch <eranhirsch@gmail.com>
@TkDodo
Copy link
Collaborator

TkDodo commented Apr 14, 2024

🎉 This issue has been resolved in version 1.59.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@BuuBux
Copy link
Author

BuuBux commented Apr 16, 2024

👏🏻 🎉

@BuuBux
Copy link
Author

BuuBux commented Apr 16, 2024

btw you mention that equals worked with Maps, but I don't think it ever did. It would simply return true for any 2 maps provided to it: https://codesandbox.io/p/sandbox/empty-cache-3tnrzs

@eranhirsch You were right, i was doing equal for both MapA.get('a') and MapA and if we select 1 element from Map it was working when we compare Maps it was false positive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request good first issue Good for newcomers released runtime Issues that refer to the runtime behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants