We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
.sort
.toSorted
1 parent 14060ce commit 7a7db45Copy full SHA for 7a7db45
scripts/build-entries-and-types/build-types-pure.mjs
@@ -86,8 +86,7 @@ function processLines(lines) {
86
87
// Replace prefixed types in the entire file
88
if (/(?::|\|)\s*\w/.test(line)) {
89
- prefixed.sort((a, b) => b.length - a.length);
90
- prefixed.forEach(item => {
+ prefixed.toSorted((a, b) => b.length - a.length).forEach(item => {
91
const reg = new RegExp(`(?<prepend>:||) ${ item }(?<type>[,;<)])`, 'g');
92
line = line.replace(reg, `$<prepend> ${ NAMESPACE }${ item }$<type>`);
93
});
0 commit comments