Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
idreyn committed Jun 18, 2024
1 parent ad666fd commit 216d05a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions common/utils/array.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export const indexByProperty = <T extends { [key: string]: any }>(
array: T[],
property: keyof T
array: T[],
property: keyof T
) => {
const res: Record<string, T> = {};
array.forEach((el) => {
res[el[property]] = el;
});
return res;
const res: Record<string, T> = {};
array.forEach((el) => {
res[el[property]] = el;
});
return res;
};

0 comments on commit 216d05a

Please sign in to comment.