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

Method implies

lib/option.js:100–108  ·  view source on GitHub ↗

* Specify implied option values for when this option is set and the implied options are not. * * The custom processing (parseArg) is not called on the implied values. * * @example * program * .addOption(new Option('--log', 'write logging information to file')) * .addOption(n

(impliedOptionValues)

Source from the content-addressed store, hash-verified

98 * @return {Option}
99 */
100 implies(impliedOptionValues) {
101 let newImplied = impliedOptionValues;
102 if (typeof impliedOptionValues === 'string') {
103 // string is not documented, but easy mistake and we can do what user probably intended.
104 newImplied = { [impliedOptionValues]: true };
105 }
106 this.implied = Object.assign(this.implied || {}, newImplied);
107 return this;
108 }
109
110 /**
111 * Set environment variable to check for option value.

Callers 4

options-implies.jsFile · 0.80
options-extra.jsFile · 0.80
index.test-d.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected