LendAndRegret/node_modules/es-toolkit/dist/array/intersectionWith.js
2026-05-02 17:27:43 +08:00

14 lines
366 B
JavaScript

'use strict';
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
function intersectionWith(firstArr, secondArr, areItemsEqual) {
return firstArr.filter(firstItem => {
return secondArr.some(secondItem => {
return areItemsEqual(firstItem, secondItem);
});
});
}
exports.intersectionWith = intersectionWith;