Isomorphic key-value storage library (v0.7.1) that works across Node.js, React Native, and browser environments. Provides a unified API (setItem, getItem, removeItem, getKeys, getEntries) with different backends: SQLite for Node.js, AsyncStorage for React Native, and localStorage for browsers. Requires explicit adapter configuration per platform, which is a common source of errors. TypeScript types included. Low release cadence; active development.
npm install keyvaluestorageNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes KeyValueStorage with in-memory SQLite, sets, gets, and removes an item.
Ensure the correct platform adapter is passed. For browsers, no adapter is needed (uses localStorage automatically).
Use `':memory:'` string for in-memory SQLite.
Use `import AsyncStorage from '@react-native-async-storage/async-storage'` and pass AsyncStorage.
Always use await or .then() when calling storage methods.
Pass serializable objects; ensure getItem returns the parsed object.
Replace with: import KeyValueStorage from 'keyvaluestorage'
Pass `database: ':memory:'` for Node.js or `asyncStorage: AsyncStorage` for React Native
Install sql.js or better-sqlite3: npm install sql.js
Ensure KeyValueStorage is instantiated with correct options and the promise resolves