Skip to content

Commit

Permalink
covert to modern ES syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner committed Jun 27, 2024
1 parent 11175fa commit c3dcc9f
Show file tree
Hide file tree
Showing 7 changed files with 308 additions and 289 deletions.
2 changes: 1 addition & 1 deletion bench/basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {readFileSync} from 'fs';
const data = JSON.parse(readFileSync(new URL('../test/fixtures/building.json', import.meta.url)));
const {vertices, holes} = flatten(data);

let start = performance.now();
const start = performance.now();
let ops = 0;
let passed = 0;

Expand Down
2 changes: 1 addition & 1 deletion bench/bench.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const samples = {
for (const name in samples) {
const {vertices, holes, dimensions} = samples[name];
new Benchmark.Suite()
.add(name + ' (' + (vertices.length / 2) + ' vertices):', function () {
.add(`${name} (${vertices.length / 2} vertices):`, () => {
earcut(vertices, holes, dimensions);
})
.on('cycle', logCycle)
Expand Down
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {default} from 'eslint-config-mourner';
Loading

0 comments on commit c3dcc9f

Please sign in to comment.