/** * @module storage/memory */ import type { IStorage, StorageValueType } from 'jodit/types'; export class MemoryStorageProvider implements IStorage { private data: Map = new Map(); set(key: string, value: T): IStorage { this.data.set(key, value); return this; } delete(key: string): IStorage { this.data.delete(key); return this; } get(key: string): R | void { return this.data.get(key) as R | void; } exists(key: string): boolean { return this.data.has(key); } clear(): IStorage { this.data.clear(); return this; } }