mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-13 15:36:25 +00:00
6 lines
182 B
TypeScript
6 lines
182 B
TypeScript
export function uniq<T = unknown>(
|
|
array: T[],
|
|
eql = (x: T, y: T): boolean => x === y
|
|
): T[] {
|
|
return array.filter((x, idx, arr) => arr.findIndex((y) => eql(x, y)) === idx);
|
|
}
|