vulcain-corejs
Version:
Vulcain micro-service framework
28 lines • 866 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
class PrioritizedSourceValue {
constructor(localSources, _remoteSources) {
this._remoteSources = _remoteSources;
this.chain = [];
if (_remoteSources)
this.chain = this.chain.concat(_remoteSources);
else {
this._remoteSources = [];
}
if (localSources)
this.chain = this.chain.concat(localSources);
}
get remoteSources() {
return this._remoteSources;
}
get(name) {
for (let pv of this.chain) {
let val = pv.get(name);
if (val !== undefined)
return val;
}
return undefined;
}
}
exports.PrioritizedSourceValue = PrioritizedSourceValue;
//# sourceMappingURL=PrioritizedSourceValue.js.map