@studyportals/sp-hs-misc
Version:
Miscellaneous code used in HouseStark's projects
13 lines • 383 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Dictionary = void 0;
class Dictionary extends Map {
obtain(key, createDefaultValueFn) {
if (!this.has(key)) {
this.set(key, createDefaultValueFn());
}
return this.get(key);
}
}
exports.Dictionary = Dictionary;
//# sourceMappingURL=dictionary.class.js.map