INNER CODE UNIT · TypeScript
parseArgs
openclaw/mcporter · scripts/build-bun.ts:23
function parseArgs(argv: string[]): Options {
let target: string | undefined;
let bytecode = false;
let minify = true;
let output: string | undefined;
for (let index = 0; index < argv.length; index += 1) {
const token = argv[index];
if (!token) {
continue;
}
if (token === '--target') {
target = requireValue(token, argv[++index]);
continue;
}
if (token === '--bytecode') {
bytecode = true;
continue;