MCPcopy
hub / github.com/MiniMax-AI/cli / flagKey

Function flagKey

src/args.ts:9–12  ·  view source on GitHub ↗

Extract camelCase flag name from an OptionDef.flag string, e.g. '--max-tokens ' → 'maxTokens'

(def: OptionDef)

Source from the content-addressed store, hash-verified

7
8/** Extract camelCase flag name from an OptionDef.flag string, e.g. '--max-tokens <n>''maxTokens' */
9function flagKey(def: OptionDef): string | null {
10 const m = def.flag.match(/^--([a-z][a-z0-9-]*)/i);
11 return m ? kebabToCamel(m[1]!) : null;
12}
13
14/** Boolean when no value placeholder and type is not string/number/array */
15function isBooleanDef(def: OptionDef): boolean {

Callers 1

buildSchemaFunction · 0.85

Calls 1

kebabToCamelFunction · 0.85

Tested by

no test coverage detected