mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
6 lines
217 B
TypeScript
6 lines
217 B
TypeScript
export const findDuplicates = (arr: (string | number)[]) => {
|
|
const duplicates = arr.filter((item, index) => arr.indexOf(item) !== index);
|
|
const unique = new Set(duplicates);
|
|
return Array.from(unique);
|
|
};
|