immediate-chunk-store
Immediate put/get for any abstract-chunk-store compliant store
Makes store.put()
calls immediately available for store.get()
calls, even before the
store.put()
callback is called, by storing the data in memory until the store.put()
completes.
Install
npm install immediate-chunk-store
Usage
var ImmediateChunkStore = require('immediate-chunk-store')
var FSChunkStore = require('fs-chunk-store')
var store = new ImmediateChunkStore(new FSChunkStore(10))
store.put(0, new Buffer('abc'), function () { })
store.get(0, function (err, data) {
if (err) throw err
console.log(data.toString())
})
License
MIT. Copyright (c) Feross Aboukhadijeh.