A storage driver for LocalForage that leverages the WebExtension chrome.storage API (local and sync areas). Current stable version is 3.0.0. Released periodically; last release 2023. The only maintained driver bridging LocalForage with browser extension storage, supporting both sync and local storage areas. Ships TypeScript types. Requires localforage ^1.7.4 as a peer dependency. Distinct from IndexedDB or WebSQL drivers; designed exclusively for WebExtension environments (Firefox, Chrome, etc.) with no fallback for other runtimes.
npm install localforage-webextensionstorage-driverNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to import and configure the WebExtension sync storage driver with LocalForage, then use the API.
Check if chrome.storage or browser.storage is available before loading the driver.
Use import syncDriver from 'localforage-webextensionstorage-driver/sync'; or import localDriver from 'localforage-webextensionstorage-driver/local';
Use local storage (unlimited) or handle storage errors via localforage error callbacks.
Change imports to specific subpath: import syncDriver from 'localforage-webextensionstorage-driver/sync' or '/local'.
Use a correct subpath import: import syncDriver from 'localforage-webextensionstorage-driver/sync';
Ensure code runs in a browser extension context with chrome.storage API available.
Install and import localforage first: import localforage from 'localforage';