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

feat: add deep-equal-json #68

Merged
merged 2 commits into from
Jun 24, 2024
Merged

feat: add deep-equal-json #68

merged 2 commits into from
Jun 24, 2024

Conversation

SukkaW
Copy link
Owner

@SukkaW SukkaW commented Jun 23, 2024

@valadaptive
Copy link

I'm not sure dequal is equivalent to deep-equal-json--for instance, I believe dequal traverses Maps and Sets whereas deep-equal-json uses referential equality

@SukkaW
Copy link
Owner Author

SukkaW commented Jun 23, 2024

I'm not sure dequal is equivalent to deep-equal-json--for instance, I believe dequal traverses Maps and Sets whereas deep-equal-json uses referential equality

The reason behind the alias is that I don't want to re-implement deep equal over and over again. JS community has enough existing implementations on the npm.

Currently, the only dependent of the deep-equal-json is the axe project. What I am really afraid of is that ljharb spread his toxic dependencies even further, which could become a serious compat issue.

@SukkaW
Copy link
Owner Author

SukkaW commented Jun 23, 2024

I'm not sure dequal is equivalent to deep-equal-json--for instance, I believe dequal traverses Maps and Sets whereas deep-equal-json uses referential equality

@valadaptive

It seems that deep-equal-json is only for JSON-supported values, so Map and Set might not be an issue since objects containing them should not be passed to deep-equal-json in the first place anyway.

On the other hand, should I use dequal/lite instead? It seems that dequal/lite also doesn't include deep Map and Set comparisons and thus behaves similarly.

@valadaptive
Copy link

It seems like dequal/lite is part of the dequal package already--I think that'd be preferable, yeah

@mikkurogue
Copy link

Currently, the only dependent of the deep-equal-json is the axe project. What I am really afraid of is that ljharb spread his toxic dependencies even further, which could become a serious compat issue.

Doing God's work ❤️

@SukkaW
Copy link
Owner Author

SukkaW commented Jun 23, 2024

It seems like dequal/lite is part of the dequal package already

dequal is already lightweight enough, thus not a problem. The behavior match is more important in this context.

@SukkaW SukkaW merged commit f009d3b into master Jun 24, 2024
1 check passed
@SukkaW SukkaW deleted the deep-equal-json branch July 10, 2024 08:37
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

Successfully merging this pull request may close these issues.

Replacing deep-equal-json
3 participants