A lexicon-driven AppView for ATProto.
Something went wrong. Try again.
414 B · 17 lines
TypeScript
at dev
123456789101112131415161718import type { StorageAdapter } from "./types";
export class MemoryStorage implements StorageAdapter { private data = new Map<string, string>();
async get(key: string): Promise<string | null> { return this.data.get(key) ?? null; }
async set(key: string, value: string): Promise<void> { this.data.set(key, value); }
async delete(key: string): Promise<void> { this.data.delete(key); }}