1.0.0-beta.2 • Published 6 years ago

@fanny-pack/browser-extension v1.0.0-beta.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

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 in local storage are local to the machine the extension was installed on.
  • sync - Items in sync 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.