MCPcopy Create free account
hub / github.com/node-config/node-config / loadConfig

Function loadConfig

benchmarks/index.js:11–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9process.env.NODE_CONFIG_DIR = configDir;
10
11function loadConfig() {
12 const { Load, Util } = require("../lib/util.js");
13 const load = new Load({ configDir });
14
15 load.scan();
16
17 return Util.toObject(load.config);
18}
19
20const benchmarks = new Benchmark({
21 '4.0.1': 'config@4.0.1',

Callers 1

index.jsFile · 0.85

Calls 2

scanMethod · 0.95
toObjectMethod · 0.45

Tested by

no test coverage detected