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

Method createCommand

examples/global-options-added.js:17–21  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

15// If the options are unsorted in the help, these will appear first.
16class MyRootCommand extends Command {
17 createCommand(name) {
18 const cmd = new Command(name);
19 cmd.option('-v, --verbose', 'use verbose logging');
20 return cmd;
21 }
22}
23
24const program = new MyRootCommand();

Callers

nothing calls this directly

Calls 1

optionMethod · 0.95

Tested by

no test coverage detected