UNPKG

use-idb-store

Version:

A React state hook that syncs state to IndexedDB for persistent, offline-friendly, and large-scale data storage.

17 lines (16 loc) 527 B
export declare class DB { private static instance; private indexedDB; private stores; private version; private dbInitPromise; private constructor(); static getInstance(): DB; private getCurrentDatabaseVersion; private openDatabase; private initializeDatabase; createStore(name: string, schema?: IDBObjectStoreParameters): Promise<void>; getStore(name: string): Promise<IDBObjectStore>; clearStore(name: string): Promise<void>; deleteStore(name: string): Promise<void>; }