MCPcopy
hub / github.com/openclaw/clawsweeper / parseArgs

Function parseArgs

src/repair/lib.ts:438–460  ·  view source on GitHub ↗
(argv: string[])

Source from the content-addressed store, hash-verified

436}
437
438export function parseArgs(argv: string[]): CliArgs {
439 const args: CliArgs = { _: [] };
440 for (let i = 0; i < argv.length; i += 1) {
441 const arg = argv[i];
442 if (!arg) continue;
443 if (arg === "--") {
444 continue;
445 }
446 if (!arg.startsWith("--")) {
447 args._.push(arg);
448 continue;
449 }
450 const key = arg.slice(2);
451 const next = argv[i + 1];
452 if (!next || next.startsWith("--")) {
453 args[key] = true;
454 } else {
455 args[key] = next;
456 i += 1;
457 }
458 }
459 return args;
460}
461
462export function assertAllowedOwner(repo: string, allowedOwner?: string) {
463 if (!allowedOwner) return;

Callers 15

mainFunction · 0.70
mainFunction · 0.70
review-results.tsFile · 0.70
create-job.tsFile · 0.70
publish-result.tsFile · 0.70
dispatch-jobs.tsFile · 0.70
apply-result.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected