Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 | 54x 2059x 2059x | // These are functions that are found from lodash but not from remeda
// https://lodash.com/docs/4.17.15#differenceBy
export const differenceBy = <T, U>(
array: readonly T[],
values: readonly U[],
iteratee: (item: T | U) => string | number | symbol,
): T[] => {
const seen = new Set(values.map((element) => iteratee(element)));
return array.filter((item) => !seen.has(iteratee(item)));
};
|