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

intersectionBy difference with lodash #956

Open
bryanwonggy opened this issue Feb 10, 2025 · 1 comment
Open

intersectionBy difference with lodash #956

bryanwonggy opened this issue Feb 10, 2025 · 1 comment

Comments

@bryanwonggy
Copy link

bryanwonggy commented Feb 10, 2025

The intersectionBy function in lodash removes duplicates while the intersectionBy function in es-toolkit doesn't.

For lodash-es, the intersectionBy function removes duplicates. Doc

See example

CleanShot 2025-02-10 at 13 28 52@2x

For es-toolkit, the intersectionBy function doesn't remove duplicates. Doc

See example

CleanShot 2025-02-10 at 13 28 57@2x

Was this intended?

@AbdessamadEnabih
Copy link

Hello @bryanwonggy, to add your to issue, Lodash supports multiple arrays. It computes the intersection across all provided arrays unlike es-toolkit it only supports two arrays.

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

2 participants