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

Function parseArgs

scripts/verification-plan.js:7–22  ·  view source on GitHub ↗
(argv)

Source from the content-addressed store, hash-verified

5const { selectVerificationProfile } = require('../core/verification/profiles');
6
7function parseArgs(argv) {
8 const args = {
9 projectRoot: process.cwd(),
10 json: false,
11 help: false,
12 };
13
14 for (let index = 0; index < argv.length; index++) {
15 const arg = argv[index];
16 if (arg === '--project-root') args.projectRoot = path.resolve(argv[++index] || '.');
17 else if (arg === '--json') args.json = true;
18 else if (arg === '--help' || arg === '-h') args.help = true;
19 }
20
21 return args;
22}
23
24function usage() {
25 return [

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected