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

Function parseArgs

scripts/runtime-matrix.js:7–17  ·  view source on GitHub ↗
(argv)

Source from the content-addressed store, hash-verified

5const { runtime } = require('../core/contracts');
6
7function parseArgs(argv) {
8 const args = { json: false, runtimeId: null };
9 for (let index = 2; index < argv.length; index++) {
10 const arg = argv[index];
11 const value = argv[index + 1];
12 if (arg === '--runtime') { args.runtimeId = value; index++; }
13 else if (arg === '--json') args.json = true;
14 else if (arg === '--help' || arg === '-h') args.help = true;
15 }
16 return args;
17}
18
19function usage() {
20 return 'Usage: node scripts/runtime-matrix.js [--runtime codex] [--json]';

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected