1.2.2 • Published 3 months ago

fortune-indexeddb v1.2.2

Weekly downloads
288
License
MIT
Repository
github
Last release
3 months ago

Fortune IndexedDB

Build Status npm Version License

This is an IndexedDB adapter for Fortune.js. Various performance and compatibility optimizations are included:

$ npm install fortune-indexeddb

Usage

This module works in web browsers only, and falls back to memory if IndexedDB is not available:

const fortune = require('fortune')
const indexedDBAdapter = require('fortune-indexeddb')

const store = fortune(recordTypes, {
  adapter: [ indexedDBAdapter, {
    // Name of the IndexedDB database to use. Defaults to `db`.
    name: 'db',
    // These are optional to implement, if storage compression is needed.
    compress: uint8array => uint8array,
    decompress: uint8array => uint8array,
  } ]
})

License

This software is licensed under the MIT license.

1.2.2

3 months ago

1.2.0

3 years ago

1.2.1

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

7 years ago

1.0.0

8 years ago