mirror of
https://github.com/mivodev/mivodev.github.io.git
synced 2026-01-26 21:41:53 +07:00
Fix dependencies: Add flag-icons, tailwind directives, and postcss config
This commit is contained in:
33
node_modules/regex/src/utils-internals.js
generated
vendored
Normal file
33
node_modules/regex/src/utils-internals.js
generated
vendored
Normal 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,
|
||||
};
|
||||
Reference in New Issue
Block a user