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

Method optsWithGlobals

lib/command.js:1936–1942  ·  view source on GitHub ↗

* Return an object containing merged local and global option values as key-value pairs. * * @return {object}

()

Source from the content-addressed store, hash-verified

1934 * @return {object}
1935 */
1936 optsWithGlobals() {
1937 // globals overwrite locals
1938 return this._getCommandAndAncestors().reduce(
1939 (combinedOptions, cmd) => Object.assign(combinedOptions, cmd.opts()),
1940 {},
1941 );
1942 }
1943
1944 /**
1945 * Display error message and exit (or call exitOverride).

Calls 2

optsMethod · 0.80

Tested by

no test coverage detected