Skip to content

Commit f090cfc

Browse files
committed
refactor: move function to module scope
1 parent ae3793a commit f090cfc

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎test/helpers/corpus-selection.js‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ export function classifyCorpusExpression(input) {
104104
}
105105
}
106106

107+
function sortByHash(a, b) {
108+
const hashDiff = stableHash(a) - stableHash(b);
109+
return hashDiff || a.localeCompare(b);
110+
}
111+
107112
/**
108113
* Keep one hash-selected representative of every parser shape, plus one more
109114
* when a different literal compatibility bucket exists. A stable globally
@@ -150,10 +155,6 @@ export function selectCorpusExpressions(
150155
}
151156
}
152157

153-
const sortByHash = (a, b) => {
154-
const hashDiff = stableHash(a) - stableHash(b);
155-
return hashDiff || a.localeCompare(b);
156-
};
157158
return {
158159
total: inputs.length,
159160
eligible: eligible.length,

0 commit comments

Comments
 (0)