the editable site (validation-lab)
deploy / build-and-publish (push) Successful in 1m37s

This commit is contained in:
2026-11-21 08:03:55 +01:00
commit 3ac81d5a52
13454 changed files with 2227005 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
// Separating some utils for improved tree shaking of the `./internals` export
const noncapturingDelim = String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;
/**
Updates the array in place by incrementing each value greater than or equal to the threshold.
@param {Array<number>} arr
@param {number} threshold
*/
function incrementIfAtLeast(arr, threshold) {
for (let i = 0; i < arr.length; i++) {
if (arr[i] >= threshold) {
arr[i]++;
}
}
}
/**
@param {string} str
@param {number} pos
@param {string} oldValue
@param {string} newValue
@returns {string}
*/
function spliceStr(str, pos, oldValue, newValue) {
return str.slice(0, pos) + newValue + str.slice(pos + oldValue.length);
}
export {
incrementIfAtLeast,
noncapturingDelim,
spliceStr,
};