-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Consider switching deep equal module #1055
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
Comments
Hiya! Ok so
It is an equivalence method so somethings may be seen as equiv that aren't strictly equal, like function deepEqual(a, b) {
return isEqualWith(a, b, function(a, b) {
if (typeof a !== typeof b) {
return false;
}
});
} |
I assume it does strict value equality checks? Does it handle circular references? I noticed it doesn't handle Node.js buffers? Would you able to add that? Would you be willing to ensure
That's fine. They're not equal.
My goal is not having to do that. Would be better if we all agreed what deep equality entails. |
For primitives yep. For objects it recursively crawls.
Yes.
Node buffers fall under the typed array support.
I believe it already handles those issues.
Yep, I agree. It's something for Lodash v5 for sure. In the meantime this method allows customization for the things you'd like to change and handles the rest. |
I would be explicit about that in the docs. While Node.js buffers inherit from TypedArray, they're not entirely the same thing and not everyone knows buffers inherit from TypedArray. |
C🕶L Explicit support is probably better anyways. |
@sindresorhus So I assume, until then we could use |
@vdemedes It's already part of a Lodash release, so we can just use |
@sindresorhus Yes, definitely! |
We currently use: https://github.com/sotojuan/not-so-shallow
I know this is something like the third time, but someone pointed out our current module has a lot of issues, and I'm personally not interested or have time to fix those, nor maintain a deep equal module.
I'd like to look into whether we could use
lodash.isEqual
.// @jdalton
The text was updated successfully, but these errors were encountered: