Skip to content

Commit

Permalink
refactor: use map
Browse files Browse the repository at this point in the history
  • Loading branch information
yazaldefilimone committed Aug 28, 2023
1 parent ac0c0d6 commit 82638ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/evaluator/object/builtin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ const len: BuiltinFunction = (...args: BaseObject<string>[]) => {
return new Integer(arg?.value.length);
};

export const keyboardTable: Record<string, Builtin> = {
len: new Builtin(len),
};
const keyboardTable = new Map<string, Builtin>();
keyboardTable.set("len", new Builtin(len));
export { keyboardTable };

0 comments on commit 82638ad

Please sign in to comment.