MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / readStringFlag

Function readStringFlag

scripts/fetch-recent-chat-completion-traces.ts:98–105  ·  view source on GitHub ↗
(
  argv: string[],
  name: string,
  fallback: string | null,
)

Source from the content-addressed store, hash-verified

96}
97
98function readStringFlag(
99 argv: string[],
100 name: string,
101 fallback: string | null,
102): string | null {
103 const idx = argv.indexOf(name)
104 return idx >= 0 && argv[idx + 1] ? argv[idx + 1]! : fallback
105}
106
107function parseArgs(): Args {
108 const argv = process.argv.slice(2)

Callers 1

parseArgsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected