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

Function getArgValue

scripts/skill-bench.js:54–63  ·  view source on GitHub ↗
(flag)

Source from the content-addressed store, hash-verified

52const VERIFY_HOOKS = args.includes('--verify-hooks'); // install hooks + assert telemetry grew
53const INVARIANT_ONLY = args.includes('--invariant-only'); // filter to invariant-behavior scenarios only
54function getArgValue(flag) {
55 // --flag=value OR --flag value (next token, only if it doesn't start with --)
56 const eq = args.find(a => a.startsWith(flag + '='));
57 if (eq) return eq.slice(flag.length + 1);
58 const idx = args.indexOf(flag);
59 if (idx !== -1 && idx + 1 < args.length && !args[idx + 1].startsWith('--')) {
60 return args[idx + 1];
61 }
62 return null;
63}
64
65const skillFilter = getArgValue('--skill');
66const scenarioFilter = getArgValue('--scenario');

Callers 1

skill-bench.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected