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

Function createPepperProgramWithDefault

tests/options.bool.combo.test.js:52–58  ·  view source on GitHub ↗
(defaultValue)

Source from the content-addressed store, hash-verified

50 // Flag with default, say from an environment variable.
51
52 function createPepperProgramWithDefault(defaultValue) {
53 const program = new commander.Command();
54 program
55 .option('-p, --pepper', 'add pepper', defaultValue)
56 .option('-P, --no-pepper', 'remove pepper');
57 return program;
58 }
59
60 // boolean option combo, default true, long flags
61 describe('option with default of true, long flags', () => {

Callers 1

Calls 1

optionMethod · 0.95

Tested by

no test coverage detected