UNPKG

@nodesecure/js-x-ray

Version:
19 lines 636 B
export class CollectableSetRegistry { #collectableSets = new Map(); constructor(collectableSets) { collectableSets.forEach((collectableSet) => { this.#collectableSets.set(collectableSet.type, collectableSet); }); } add(type, { value, file, location, metadata }) { const collectableSet = this.#collectableSets.get(type); collectableSet?.add(value, { file, location, metadata }); } has(type) { return this.#collectableSets.has(type); } get(type) { return this.#collectableSets.get(type); } } //# sourceMappingURL=CollectableSetRegistry.js.map