Primeiro Commit v0.beta1

This commit is contained in:
2026-04-29 00:27:50 -03:00
parent 93d4906fb5
commit 8662a153fe
27 changed files with 16303 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
export function parseArgs(argv) {
const args = {};
for (let index = 0; index < argv.length; index += 1) {
const token = argv[index];
if (!token.startsWith("--")) continue;
const key = token.slice(2);
const next = argv[index + 1];
if (!next || next.startsWith("--")) {
args[key] = "true";
continue;
}
const valueParts = [next];
let valueIndex = index + 2;
while (valueIndex < argv.length && !argv[valueIndex].startsWith("--")) {
valueParts.push(argv[valueIndex]);
valueIndex += 1;
}
args[key] = valueParts.join(" ");
index = valueIndex - 1;
}
return args;
}
export function splitCsv(value, fallback = []) {
if (!value) return fallback;
return value
.split(",")
.map((item) => item.trim())
.filter(Boolean);
}