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

Method setOptionValueWithSource

lib/command.js:944–952  ·  view source on GitHub ↗

* Store option value and where the value came from. * * @param {string} key * @param {object} value * @param {string} source - expected values are default/config/env/cli/implied * @return {Command} `this` command for chaining

(key, value, source)

Source from the content-addressed store, hash-verified

942 */
943
944 setOptionValueWithSource(key, value, source) {
945 if (this._storeOptionsAsProperties) {
946 this[key] = value;
947 } else {
948 this._optionValues[key] = value;
949 }
950 this._optionValueSources[key] = source;
951 return this;
952 }
953
954 /**
955 * Get source of option value.

Callers 9

addOptionMethod · 0.95
handleOptionValueMethod · 0.95
setOptionValueMethod · 0.95
_prepareForParseMethod · 0.95
_parseOptionsImpliedMethod · 0.95
index.test-d.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected