UNPKG

@nodesecure/js-x-ray

Version:
17 lines 548 B
export class VirtualVariableIdentifier { static #idToLocations = new Map(); static #counter = 0; static generate(name, location = undefined) { const virtualId = `__virtual_${name}_${this.#counter++}__`; this.#idToLocations.set(virtualId, location); return virtualId; } static getLocation(virtualId) { return this.#idToLocations.get(virtualId); } static reset() { this.#counter = 0; this.#idToLocations.clear(); } } //# sourceMappingURL=VirtualVariableIdentifier.js.map