mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-22 01:22:54 +00:00
feat: upgrade prettier to v3
This commit is contained in:
@@ -18,9 +18,12 @@
|
||||
*/
|
||||
export function uniqBy<T>(array: T[], transform: (item: T) => string | number): T[] {
|
||||
return Object.values(
|
||||
array.reduce((accumulator, current) => {
|
||||
accumulator[transform(current)] = current;
|
||||
return accumulator;
|
||||
}, {} as Record<string | number, T>),
|
||||
array.reduce(
|
||||
(accumulator, current) => {
|
||||
accumulator[transform(current)] = current;
|
||||
return accumulator;
|
||||
},
|
||||
{} as Record<string | number, T>,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user