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

Method option

lib/command.js:779–781  ·  view source on GitHub ↗

* Define option with `flags`, `description`, and optional argument parsing function or `defaultValue` or both. * * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space. A required * option-argument is indicated by `<>` and an optional option-argument

(flags, description, parseArg, defaultValue)

Source from the content-addressed store, hash-verified

777 */
778
779 option(flags, description, parseArg, defaultValue) {
780 return this._optionEx({}, flags, description, parseArg, defaultValue);
781 }
782
783 /**
784 * Add a required option which must have a value after parsing. This usually means

Callers 15

makeProgramFunction · 0.95
createPortProgramFunction · 0.95
createPepperProgramFunction · 0.95
createProgramFunction · 0.95
createCommandMethod · 0.95
negatives.test.jsFile · 0.80

Calls 1

_optionExMethod · 0.95

Tested by 8

makeProgramFunction · 0.76
createPortProgramFunction · 0.76
createPepperProgramFunction · 0.76
createProgramFunction · 0.76
makeProgramFunction · 0.64
createProgram1032Function · 0.64