MCPcopy Index your code
hub / github.com/lingodotdev/lingo.dev / buildOptionUsage

Function buildOptionUsage

scripts/docs/src/generate-cli-docs.ts:253–264  ·  view source on GitHub ↗
(commandPath: string, option: Option)

Source from the content-addressed store, hash-verified

251}
252
253function buildOptionUsage(commandPath: string, option: Option): string {
254 const preferred =
255 option.long || option.short || formatOptionSignature(option);
256 const placeholder = extractOptionPlaceholder(option);
257 const usage = [commandPath, preferred, placeholder]
258 .filter(Boolean)
259 .join(" ")
260 .replace(/\s+/g, " ")
261 .trim();
262
263 return usage;
264}
265
266function buildOptionDetails(option: Option): string[] {
267 const details: string[] = [];

Callers 1

buildOptionEntriesFunction · 0.85

Calls 2

formatOptionSignatureFunction · 0.85
extractOptionPlaceholderFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…