Skip to content

Commit 78c9f23

Browse files
authored
Fastest sort by default (#1323)
1 parent 07aeab3 commit 78c9f23

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

docs/app.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,11 @@ async function graph({
222222
// build a list of module names for sorting
223223
let sortedValues: BenchmarkResult[] = [];
224224

225-
if (sort === 'fastest') {
225+
if (sort === 'fastest' || !sort) {
226226
sortedValues = [...valuesNodejs, ...valuesBun].sort(
227227
(a, b) => b.ops - a.ops
228228
);
229-
} else if (sort === 'alphabetically' || !sort) {
229+
} else if (sort === 'alphabetically') {
230230
sortedValues = [...valuesNodejs, ...valuesBun].sort((a, b) =>
231231
a.name < b.name ? -1 : 1
232232
);
@@ -437,7 +437,7 @@ class App extends Component<
437437
selectedBunVersions: {},
438438
valuesNodeJs: [],
439439
valuesBun: [],
440-
sortBy: 'alphabetically' as const,
440+
sortBy: 'fastest' as const,
441441
};
442442

443443
getNodeJsVersions() {
@@ -645,8 +645,8 @@ class App extends Component<
645645
}
646646
value={this.state.sortBy}
647647
>
648-
<option value="alphabetically">Alphabetically</option>
649648
<option value="fastest">Fastest</option>
649+
<option value="alphabetically">Alphabetically</option>
650650
</select>
651651
</label>
652652
</div>

docs/dist/app.js

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)