Skip to content

Commit

Permalink
index.js: use Object.entries
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed May 25, 2023
1 parent 89d9d3a commit 543f4f4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,7 @@ function dedupeNonExistent(nonExistent) {
const deduped = new Set(nonExistent);
nonExistent.length = deduped.size;

let i = 0;
for (const elem of deduped) {
for (const { elem, i } of Object.entries(deduped)) {
nonExistent[i] = elem;
i++;
}
}

0 comments on commit 543f4f4

Please sign in to comment.