# buffer-read-await

> asynchronously read data from incoming buffer stream

Latest version **0.1.2** (published 2019-08-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install buffer-read-await
pnpm add buffer-read-await
yarn add buffer-read-await
bun add buffer-read-await
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2019-08-31 |
| First published | 2019-08-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | joseph@lostsource.com |
| Maintainers | lostsource |
| Keywords | buffer, read, async, await, promise |

## Links

- npm: https://www.npmjs.com/package/buffer-read-await
- Repository: https://github.com/lostsource/buffer-read-await
- Homepage: https://github.com/lostsource/buffer-read-await#readme
- Issues: https://github.com/lostsource/buffer-read-await/issues
- npm.io page: https://npm.io/package/buffer-read-await

## Alternatives

- [promise-throttle](https://npm.io/package/promise-throttle.md) — 44.2K weekly downloads
- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2019-08-31
- 0.1.1 — 2019-08-25
- 0.1.0 — 2019-08-25

## README

# buffer-read-await
Asynchronously read data from incoming buffer stream

## Installation

```
npm install buffer-read-await
```

## Usage
### Create a reader

```
const BufferReadAwait = require('buffer-read-await');
bfrReader = BufferReadAwait.alloc(1024);
```

### Append data
```
bfrReader.append(buffer);
```
### Read data
Any of the standard NodeJS Buffer readers can be used. (readInt8, readUInt8, readInt16BE, readInt16LE, readUInt16BE, readUInt16LE, readInt32BE, readInt32LE, readUInt32BE, readUInt32LE, readBigInt64BE, readBigInt64LE, readBigUInt64BE, readBigUInt64LE)
```
let testbyte = await bfrReader.readUInt8();
```
The promise will resolve once enough data has been appended.

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