MCPcopy Create free account
hub / github.com/yargs/yargs / parseArgs

Function parseArgs

lib/argsert.ts:16–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14 arg3?: number
15): void {
16 function parseArgs(): [
17 Pick<ParsedCommand, 'demanded' | 'optional'>,
18 any[],
19 number?,
20 ] {
21 return typeof arg1 === 'object'
22 ? [{demanded: [], optional: []}, arg1, arg2 as number | undefined]
23 : [
24 parseCommand(`cmd ${arg1}`),
25 arg2 as any[],
26 arg3 as number | undefined,
27 ];
28 }
29 // TODO: should this eventually raise an exception.
30 try {
31 // preface the argument description with "cmd", so

Callers 1

argsertFunction · 0.85

Calls 1

parseCommandFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…