Skip to content

Commit

Permalink
fix: eslint ignore line
Browse files Browse the repository at this point in the history
  • Loading branch information
GODrums committed Nov 22, 2024
1 parent 058c169 commit 39fdee8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion webapp/src/app/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function groupBy<T, K extends keyof any>(arr: T[], key: (i: T) => K) {
return arr.reduce(
(groups, item) => {
(groups[key(item)] ||= []).push(item);
return groups;
},
{} as Record<K, T[]>
)
);
}

0 comments on commit 39fdee8

Please sign in to comment.