feat: init

This commit is contained in:
2026-02-13 22:02:30 +01:00
commit 8f9ff830fb
16711 changed files with 3307340 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
function parseArgsStringToArgv(value, env, file) {
const myRegexp = (
// @ts-expect-error Bypass typescript validation
// biome-ignore lint/complexity/noUselessEscapeInRegex: Bypass validation
/([^\s'"]([^\s'"]*(['"])([^\3]*?)\3)+[^\s'"]*)|[^\s'"]+|(['"])([^\5]*?)\5/gi
);
const myString = value;
const myArray = [];
if (env) {
myArray.push(env);
}
if (file) {
myArray.push(file);
}
let match;
do {
match = myRegexp.exec(myString);
if (match !== null) {
myArray.push(firstString(match[1], match[6], match[0]));
}
} while (match !== null);
return myArray;
}
function firstString(...args) {
for (let i = 0; i < args.length; i++) {
const arg = args[i];
if (typeof arg === "string") {
return arg;
}
}
}
export {
parseArgsStringToArgv as default,
parseArgsStringToArgv
};
//# sourceMappingURL=argv.js.map