Browser storage adapter for Keyv, supporting localStorage and IndexedDB. Version 0.1.1, released as an early-stage package with TypeScript types. It provides a Keyv-compatible store interface for browser environments, enabling caching and persistent storage. Differentiates by offering both localStorage and IndexedDB adapters for Keyv, plus a utility `makeField` for direct store access.
npm install keyv-browserNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates using keyv-browser with Keyv (localStorage and IndexedDB) and the makeField utility for direct store access.
Use only in browser environments or provide appropriate polyfills.
Be aware that stored data is persistent unless explicitly deleted.
Ensure your store adapter conforms to Keyv's store interface.
Run `npm install keyv keyv-browser` and use correct import: `import { KeyvLocalStorage } from 'keyv-browser'`Create a Keyv instance with the adapter: `const keyv = new Keyv({ store: new KeyvLocalStorage() })`Use a polyfill like `global.localStorage = require('localstorage-polyfill')` or avoid Node.js.