MCPcopy
hub / github.com/tj/commander.js / parse

Method parse

lib/command.js:1081–1087  ·  view source on GitHub ↗

* Parse `argv`, setting options and invoking commands when defined. * * Use parseAsync instead of parse if any of your action handlers are async. * * Call with no parameters to parse `process.argv`. Detects Electron and special node options like `node --eval`. Easy mode! * * Or cal

(argv, parseOptions)

Source from the content-addressed store, hash-verified

1079 */
1080
1081 parse(argv, parseOptions) {
1082 this._prepareForParse();
1083 const userArgs = this._prepareUserArgs(argv, parseOptions);
1084 this._parseCommand([], userArgs);
1085
1086 return this;
1087 }
1088
1089 /**
1090 * Parse `argv`, setting options and invoking commands when defined.

Calls 3

_prepareForParseMethod · 0.95
_prepareUserArgsMethod · 0.95
_parseCommandMethod · 0.95

Tested by 3

getSuggestionFunction · 0.64
callProgramFunction · 0.64
getSuggestionFunction · 0.64