Fortune IndexedDB
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: 'db',
compress: uint8array => uint8array,
decompress: uint8array => uint8array,
} ]
})
License
This software is licensed under the MIT license.