* 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)
| 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. |
no outgoing calls
no test coverage detected