racquetjs
Version:
one more js framework
24 lines • 728 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
let instance = null;
class ComponentService {
constructor() {
this.componentHashPrefix = 'c_';
if (!instance) {
instance = this;
}
this.componentList = [];
return instance;
}
addComponent(component) {
this.componentList.push(component);
}
getComponentHash(component) {
return this.componentHashPrefix + this.componentList.indexOf(component);
}
removeComponent(component) {
this.componentList = this.componentList.filter(elem => elem !== component);
}
}
exports.ComponentService = ComponentService;
//# sourceMappingURL=component.service.js.map