idbkv-chunk-store
Abstract chunk store implementation built on idb-kv: a small IndexedDB wrapper that automatically batches for performance.
Install
npm install idbkv-chunk-store
Usage
See abstract-chunk-store
var IdbkvChunkStore = require('idbkv-chunk-store')
var store = new IdbkvChunkStore(10,
{
name: 'example',
length: 37,
batchInterval: 10
}
)
store.put(0, Buffer.from('0123456789'), (err) => {
if (err) throw err
store.get(0, (err, chunk) => {
if (err) throw err
console.log(chunk)
})
})
Compatibility
idb-kv uses async functions, so those need to be supported to use this library.