Skip to content

MinEduTDF/idb-chunk-store

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

idb-chunk-store Build Status js-standard-style

IndexedDB chunk store that is abstract-chunk-store compliant

Install

npm install idb-chunk-store

Usage

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
  })
})

API

var store = idbChunkStore(chunkLength, opts={})

Create a new chunk store with chunks of size chunkLength.

  • opts.name - use a name to separate the contents of different stores

License

MIT

About

IndexedDB chunk store that is abstract-chunk-store compliant

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%