Add items and see them in the table. Data is stored in IndexedDB with TTL and eviction.
| Id | Name | Role | Created | Expires |
|---|
import { createIdb } from "idb-refined";
type User = { id: string; name: string; role: string };
const client = await createIdb<User>({ dbName: "idb-refined-example" });
await client.set({ id: "1", name: "Alice", role: "admin" });
const all = await client.getAll();
await client.delete("1");
await client.deleteDb();
How to view data in IndexedDB: Open DevTools (F12) → Application tab (Chrome/Edge) or Storage tab (Firefox) → IndexedDB → expand your origin → open idb-refined-example → open the store object store to see keys and values.