# abstract-random-access

> Base class for random access stores

Latest version **1.1.2** (published 2016-10-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install abstract-random-access
pnpm add abstract-random-access
yarn add abstract-random-access
bun add abstract-random-access
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2016-10-07 |
| First published | 2016-07-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 30 |
| Maintainers | juliangruber |

## Links

- npm: https://www.npmjs.com/package/abstract-random-access
- Repository: https://github.com/juliangruber/abstract-random-access
- Homepage: https://github.com/juliangruber/abstract-random-access#readme
- Issues: https://github.com/juliangruber/abstract-random-access/issues
- npm.io page: https://npm.io/package/abstract-random-access

## Dependencies (1)

- [inherits](https://npm.io/package/inherits.md) ^2.0.1

## Recent versions

- 1.1.2 (latest) — 2016-10-07
- 1.1.1 — 2016-09-07
- 1.1.0 — 2016-08-02
- 1.0.2 — 2016-07-27
- 1.0.1 — 2016-07-27
- 1.0.0 — 2016-07-27

## README

# abstract-random-access

Base class for random access stores, such as

- [random-access-file](https://github.com/mafintosh/random-access-file)
- [random-access-memory](https://github.com/mafintosh/random-access-memory)

## Features

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

## Example

```js
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

---
_Source: https://npm.io/package/abstract-random-access · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
