Skip to content

Commit

Permalink
Use Array.from API better
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed Aug 13, 2021
1 parent 2de5572 commit 870246b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion benchmark/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async function runBenchmark(config) {
*
* @typedef {{ best: number; worst: number, relative: number[], avgRelative?: number }} Summary
*/
const totalSummary = Array.from({ length: candidates.length }).map(() => ({ best: 0, worst: 0, relative: [] }));
const totalSummary = Array.from({ length: candidates.length }, () => ({ best: 0, worst: 0, relative: [] }));

for (const $case of cases) {

Expand Down

0 comments on commit 870246b

Please sign in to comment.