IndexedDB chunk store that is abstract-chunk-store compliant
For versions before 1.0, see https://github.com/MinEduTDF/idb-chunk-store
npm install idb-chunk-store
var idbChunkStore = require('idb-chunk-store')
var chunks = idbChunkStore(10)
chunks.put(0, new Buffer('01234567890'), function (err) {
if (err) throw err
chunks.get(0, function (err, chunk) {
if (err) throw err
console.log(chunk) // '01234567890' as a buffer
})
})
Create a new chunk store with chunks of size chunkLength
.
opts.name
- use a name to separate the contents of different stores
MIT