UNPKG

@instantdb/core

Version:

Instant's core local abstraction

15 lines (12 loc) 242 B
export default class InMemoryStorage { constructor(dbName) { this.dbName = dbName; this.store = new Map(); } async getItem(k) { return this.store.get(k) ?? null; } async setItem(k, v) { this.store.set(k, v); } }