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

Function arg

scripts/codex-install.js:15–21  ·  view source on GitHub ↗
(name, fallback = null)

Source from the content-addressed store, hash-verified

13}
14
15function arg(name, fallback = null) {
16 const prefix = `${name}=`;
17 const inline = process.argv.find((value) => value.startsWith(prefix));
18 if (inline) return inline.slice(prefix.length);
19 const idx = process.argv.indexOf(name);
20 return idx >= 0 ? process.argv[idx + 1] : fallback;
21}
22
23function q(value) {
24 const text = String(value);

Callers 1

codex-install.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected