MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / getFlag

Function getFlag

cli/src/bin/e2a.ts:43–50  ·  view source on GitHub ↗
(args: string[], flag: string)

Source from the content-addressed store, hash-verified

41}
42
43function getFlag(args: string[], flag: string): string | undefined {
44 const idx = args.indexOf(flag);
45 if (idx === -1) return undefined;
46 const value = args[idx + 1];
47 // Don't consume another flag as a value
48 if (value === undefined || value.startsWith("--")) return undefined;
49 return value;
50}
51
52function getFlags(args: string[], flag: string): string[] {
53 const values: string[] = [];

Callers 2

mainFunction · 0.85
args.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected