@fanny-pack/browser-extension
v1.0.0-beta.2
Published
[Fanny Pack](https://github.com/LinusU/fanny-pack) running in a browser extension on top of [the `storage` API](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage).
Downloads
3
Readme
Fanny Pack Browser
Fanny Pack running in a browser extension on top of the storage
API.
Installation
npm install --save @fanny-pack/browser-extension
Usage
const FannyPack = require('@fanny-pack/browser-extension')
const fp = new FannyPack('sync', 'important-data')
You can now use fp
as any other Fanny Pack.
API
new FannyPack(storageArea: string, databaseName: string)
Create or open an existing database with the provided name, in the given storage area.
Valid storage areas:
local
- Items inlocal
storage are local to the machine the extension was installed on.sync
- Items insync
storage are synced by the browser, and are available across all instances of that browser that the user is logged into, across different devices.
The rest of the API follows the shared Fanny Pack API.