UNPKG

racquetjs

Version:
24 lines 728 B
"use strict"; 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