UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

28 lines 732 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ObjectMap = void 0; /** * A map type that accepts an arbitrary object as key. * {@link JSON.stringify} is used to create the actual key for the underlying map. * This can be helpful if value equality is desired. */ class ObjectMap { internal = new Map(); makeKey(key) { return JSON.stringify(key); } /** * Sets a value for a given key. */ set(key, v) { this.internal.set(this.makeKey(key), v); } /** * Return the value for the key. */ get(key) { return this.internal.get(this.makeKey(key)); } } exports.ObjectMap = ObjectMap; //# sourceMappingURL=objectmap.js.map