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

Method prepareContext

lib/help.js:30–32  ·  view source on GitHub ↗

* prepareContext is called by Commander after applying overrides from `Command.configureHelp()` * and just before calling `formatHelp()`. * * Commander just uses the helpWidth and the rest is provided for optional use by more complex subclasses. * * @param {{ error?: boolean, helpWidt

(contextOptions)

Source from the content-addressed store, hash-verified

28 * @param {{ error?: boolean, helpWidth?: number, outputHasColors?: boolean }} contextOptions
29 */
30 prepareContext(contextOptions) {
31 this.helpWidth = this.helpWidth ?? contextOptions.helpWidth ?? 80;
32 }
33
34 /**
35 * Get an array of the visible subcommands. Includes a placeholder for the implicit help command, if there is one.

Callers 2

helpInformationMethod · 0.45
index.test-d.tsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected