Skip to content

Commit

Permalink
Update src/object/invert.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
raon0211 authored Jul 17, 2024
1 parent 72a21e1 commit 2f91726
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/object/invert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export function invert<K extends PropertyKey, V extends PropertyKey>(obj: Record
const result = {} as { [key in V]: K };

const keys = Object.keys(obj) as K[];

for (let i = 0; i < keys.length; i++) {
const key = keys[i];
const value = obj[key];
Expand Down

0 comments on commit 2f91726

Please sign in to comment.