MCPcopy
hub / github.com/indexzero/nconf / loadSources

Function loadSources

lib/nconf/provider.js:479–501  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

477 }
478
479 function loadSources () {
480 var sourceHierarchy = self.sources.splice(0);
481 sourceHierarchy.reverse();
482
483 //
484 // If we don't have a callback and the current
485 // store is capable of loading synchronously
486 // then do so.
487 //
488 if (!callback) {
489 mergeSources(loadBatch(sourceHierarchy));
490 return loadBatch(getStores());
491 }
492
493 loadBatch(sourceHierarchy, function (err, data) {
494 if (err) {
495 return callback(err);
496 }
497
498 mergeSources(data);
499 return loadBatch(getStores(), callback);
500 });
501 }
502
503 return self.sources.length
504 ? loadSources()

Callers 1

provider.jsFile · 0.85

Calls 3

mergeSourcesFunction · 0.85
loadBatchFunction · 0.85
getStoresFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…