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

Method scan

lib/util.js:1102–1117  ·  view source on GitHub ↗

* scan and load config files in the same manner that config.js does * * @see ConfigUtils.setModuleDefaults() * @param {{name: string, config: any}[]=} additional additional values to populate (usually from NODE_CONFIG) * @returns {object} - config data

(additional)

Source from the content-addressed store, hash-verified

1100 * @returns {object} - config data
1101 */
1102 scan(additional) {
1103 Util.loadFileConfigs(this);
1104
1105 if (additional) {
1106 for (let {name, config} of additional) {
1107 this.addConfig(name, config);
1108 }
1109 }
1110
1111 // Override with environment variables if there is a custom-environment-variables.EXT mapping file
1112 this.loadCustomEnvVars();
1113
1114 Util.resolveDeferredConfigs(this.config);
1115
1116 return this.config;
1117 }
1118
1119 /**
1120 * Load a file and add it to the configuration

Callers 4

loadConfigFunction · 0.95
loadFileConfigsMethod · 0.80
_initFunction · 0.80
0-util.jsFile · 0.80

Calls 4

addConfigMethod · 0.95
loadCustomEnvVarsMethod · 0.95
loadFileConfigsMethod · 0.45

Tested by

no test coverage detected