@minimaltech/node-infra
Version:
Minimal Technology NodeJS Infrastructure - Loopback 4 Framework
37 lines • 941 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DIContainerHelper = void 0;
class DIContainerHelper {
constructor() {
this.container = Object.assign({});
}
static getInstance() {
if (!this.instance) {
this.instance = new DIContainerHelper();
}
return this.instance;
}
static newInstance() {
return new DIContainerHelper();
}
isBound(key) {
return key in this.container;
}
get(key) {
return this.container[key];
}
set(key, value) {
this.container = Object.assign(this.container, { [key]: value });
}
keys() {
return Object.keys(this.container);
}
clear() {
this.container = Object.assign({});
}
getContainer() {
return this.container;
}
}
exports.DIContainerHelper = DIContainerHelper;
//# sourceMappingURL=di-container.helper.js.map