# pipelining

> xhr chunked stream handler for the browser and NodeJS

Latest version **2.2.3** (published 2017-03-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install pipelining
pnpm add pipelining
yarn add pipelining
bun add pipelining
```

## 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 | 2.2.3 |
| Published | 2017-03-07 |
| First published | 2017-01-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 5 |
| Maintainers | tomwan |

## Links

- npm: https://www.npmjs.com/package/pipelining
- Repository: https://github.com/wanming/pipelining
- Homepage: https://github.com/wanming/pipelining#readme
- Issues: https://github.com/wanming/pipelining/issues
- npm.io page: https://npm.io/package/pipelining

## Dependencies (6)

- [debug](https://npm.io/package/debug.md) ^2.6.1
- [request](https://npm.io/package/request.md) ^2.79.0
- [bluebird](https://npm.io/package/bluebird.md) ^3.4.7
- [lodash.keys](https://npm.io/package/lodash.keys.md) ^4.2.0
- [lodash.clone](https://npm.io/package/lodash.clone.md) ^4.5.0
- [lodash.assign](https://npm.io/package/lodash.assign.md) ^4.2.0

## Recent versions

- 2.2.3 (latest) — 2017-03-07
- 2.2.2 — 2017-03-07
- 2.2.1 — 2017-03-06
- 2.2.0 — 2017-02-21
- 2.1.1 — 2017-02-21
- 2.1.0 — 2017-02-14
- 1.2.2 — 2017-02-06
- 1.2.0 — 2017-01-25
- 1.1.0 — 2017-01-23
- 1.0.0 — 2017-01-04

## README

# pipelining
Xhr chunked stream client for the browser and NodeJS

### HOW TO USE

#### front-end
```javascript
const pipelining = require('pipelining');

const reader = pipelining('/test');

function read() {
  reader.read().then(partial => {
    if (partial.done) {
      return;
    }

    handle(partial.data).then(read);
  });
}

read();
```

#### back-end
```javascript
const pipelining = require('pipelining');
// http handler
function (req, res) {
  res.write(pipelining.pack(1));
  // after several seconds..
  res.write(pipelining.pack({ tom: 'test' }));
  // after 1 min..
  res.end();
}
```

### TODO:
1. node.js version
1. headers support

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