Use random-access-storage instead.
Base class for random access stores, such as
- ensures the store has been
.open()
ed - verifies and defaults arguments
- provides stubs for unimplemented functions
- emits
open
andclose
events
var Abstract = require('abstract-random-access')
var inherits = require('inherits')
var Store = function () {
Abstract.call(this)
}
inherits(Store, Abstract)
Store.prototype._read = function (offset, length, callback) {
process.nextTick(function () {
callback(null, Buffer('ohai'))
})
}
MIT