/
kochenov
/
universal-modular
Обзор
Документация
Войти
/
kochenov
/
universal-modular
Код
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
node_modules/regex/src/utils-internals.js
33 строки
772 B
Kochenov Dmitry
feat(foundation): Шаг 1.3 — Установить Node.js 24 + VitePress + настроить конфигурацию
10 июл 2026, 11:06
10 июл 2026, 11:06
70eff21
Код
Авторство
О чём код?
// 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, };