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

Function readStringFlag

scripts/export-deepseek-session-traces.ts:120–127  ·  view source on GitHub ↗
(
  argv: string[],
  name: string,
  fallback: string | null,
)

Source from the content-addressed store, hash-verified

118}
119
120function readStringFlag(
121 argv: string[],
122 name: string,
123 fallback: string | null,
124): string | null {
125 const idx = argv.indexOf(name)
126 return idx >= 0 && argv[idx + 1] ? argv[idx + 1]! : fallback
127}
128
129function readSampleMode(argv: string[]): Args['sampleMode'] {
130 const mode = readStringFlag(argv, '--sample-mode', 'newest')

Callers 2

readSampleModeFunction · 0.70
parseArgsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected