@beyond-js/bundles-sdk
Version:
BeyondJS Bundles SDK
21 lines (17 loc) • 490 B
JavaScript
/**
* Processors extensions by distribution
*/
module.exports = class {
#distributions = new Map();
#processor;
get processor() {
return this.#processor;
}
get(distribution) {
const {key} = distribution;
if (this.#distributions.has(key)) return this.#distributions.get(key);
const extender = new (require('./extender'))(this.#processor, distribution);
this.#distributions.set(key, extender);
return extender;
}
}