fume-fhir-converter
Version:
FHIR-Utilized Mapping Engine - Community
38 lines • 865 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SimpleCache = void 0;
class SimpleCache {
options;
cache;
// @ts-expect-error
constructor(options = {}) {
this.options = options;
this.cache = {};
}
get(key) {
return this.cache[key];
}
set(key, value) {
this.cache[key] = value;
}
remove(key) {
if (this.cache[key] !== undefined) {
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
delete this.cache[key];
}
}
keys() {
return Object.keys(this.cache);
}
reset() {
this.cache = {};
}
populate(dict) {
this.cache = dict || {};
}
getDict() {
return this.cache;
}
}
exports.SimpleCache = SimpleCache;
//# sourceMappingURL=simpleCache.js.map