MCPcopy Create free account
hub / github.com/langgenius/dify / flagLabel

Function flagLabel

cli/src/framework/help.ts:48–59  ·  view source on GitHub ↗
(name: string, def: FlagDefinition)

Source from the content-addressed store, hash-verified

46}
47
48function flagLabel(name: string, def: FlagDefinition): string {
49 const aliases: string[] = []
50
51 if (def.char)
52 aliases.push(`-${def.char}`)
53
54 aliases.push(`--${name}`)
55
56 const label = aliases.join(', ')
57
58 return def.type === 'boolean' ? label : `${label} <${def.type}>`
59}
60
61function flagDefault(def: FlagDefinition): string {
62 if (def.default === undefined)

Callers 1

formatHelpTextFunction · 0.85

Calls 2

pushMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected