MCPcopy Index your code
hub / github.com/node-config/node-config / addConfig

Method addConfig

lib/util.js:1076–1092  ·  view source on GitHub ↗

* Add a set of configurations and record the source * * @param {string=} name an entry will be added to sources under this name (if given) * @param {object=} values values to merge in * @param {string=} original Optional unparsed version of the data * @return {Load} this

(name, values, original)

Source from the content-addressed store, hash-verified

1074 * @return {Load} this
1075 */
1076 addConfig(name, values, original) {
1077 this.updated = true;
1078
1079 Util.extendDeep(this.config, values);
1080
1081 if (name && this.sources) {
1082 let source = {name, parsed: values};
1083
1084 if (original !== undefined) {
1085 source.original = original;
1086 }
1087
1088 this.sources.push(source);
1089 }
1090
1091 return this;
1092 }
1093
1094
1095 /**

Callers 4

scanMethod · 0.95
loadFileMethod · 0.95
0-util.jsFile · 0.80
util.tsFile · 0.80

Calls 1

extendDeepMethod · 0.80

Tested by

no test coverage detected