Skip to content

Conversation

HidenLee
Copy link
Contributor

@HidenLee HidenLee commented Sep 9, 2025

Previous implementation

  • intersectionBy returned every element from the first array whose mapped key appeared in the second array.
  • This included multiple items from the first array when they shared the same iteratee key which diverges from Lodash

Relate Issue

Changes

  • for deduplication, filter method should store each mapped item to another set, and compare them as key.
  • add a test "should dedupes results by the iteratee key"

@codecov-commenter
Copy link

codecov-commenter commented Sep 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.75%. Comparing base (33ee94e) to head (323bad0).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1396   +/-   ##
=======================================
  Coverage   99.75%   99.75%           
=======================================
  Files         468      468           
  Lines        4439     4445    +6     
  Branches     1309     1310    +1     
=======================================
+ Hits         4428     4434    +6     
  Misses         11       11           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@HidenLee HidenLee closed this by deleting the head repository Oct 1, 2025
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.

Differences in the behavior of intersectionBy between lodash and es-toolkit

2 participants