1.1.2 • Published 8 years ago

abstract-random-access v1.1.2

Weekly downloads
90
License
MIT
Repository
github
Last release
8 years ago

abstract-random-access

Base class for random access stores, such as

Features

  • ensures the store has been .open()ed
  • verifies and defaults arguments
  • provides stubs for unimplemented functions
  • emits open and close events

Example

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

License

MIT

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago