UNPKG

bigblocks

Version:

Complete Bitcoin UI component library - authentication, social, wallet, market, inscriptions, and blockchain interactions for React

23 lines (22 loc) 495 B
/** * In-memory storage adapter * Useful for testing and temporary storage * Data is lost when process ends */ export function createMemoryStorage() { const store = new Map(); return { async get(key) { return store.get(key) ?? null; }, async set(key, value) { store.set(key, value); }, async delete(key) { store.delete(key); }, async clear() { store.clear(); }, }; }