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

Method requiredOption

lib/command.js:796–804  ·  view source on GitHub ↗

* Add a required option which must have a value after parsing. This usually means * the option must be specified on the command line. (Otherwise the same as .option().) * * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space. * * @param {string

(flags, description, parseArg, defaultValue)

Source from the content-addressed store, hash-verified

794 */
795
796 requiredOption(flags, description, parseArg, defaultValue) {
797 return this._optionEx(
798 { mandatory: true },
799 flags,
800 description,
801 parseArg,
802 defaultValue,
803 );
804 }
805
806 /**
807 * Alter parsing of short flags with optional values.

Calls 1

_optionExMethod · 0.95

Tested by

no test coverage detected