This repository has been archived on 2026-03-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
StasisWarden-Legacy/node_modules/es-toolkit/dist/array/intersectionBy.mjs
T

7 lines
216 B
JavaScript

function intersectionBy(firstArr, secondArr, mapper) {
const mappedSecondSet = new Set(secondArr.map(mapper));
return firstArr.filter(item => mappedSecondSet.has(mapper(item)));
}
export { intersectionBy };