MCPcopy Create free account
hub / github.com/SethGammon/Citadel / getArgValue

Function getArgValue

scripts/noop-apply.js:36–42  ·  view source on GitHub ↗
(flag)

Source from the content-addressed store, hash-verified

34const DRY_RUN = args.includes('--dry-run');
35
36function getArgValue(flag) {
37 const eq = args.find(a => a.startsWith(flag + '='));
38 if (eq) return eq.slice(flag.length + 1);
39 const idx = args.indexOf(flag);
40 if (idx !== -1 && idx + 1 < args.length && !args[idx + 1].startsWith('--')) return args[idx + 1];
41 return null;
42}
43const skillFilter = getArgValue('--skill');
44const verdictsPath = getArgValue('--verdicts');
45

Callers 1

noop-apply.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected