# httpiped-stream

> prettier streams for httpiped

Latest version **0.1.0** (published 2014-06-29) · BSD license · 0 weekly downloads

## Install

```sh
npm install httpiped-stream
pnpm add httpiped-stream
yarn add httpiped-stream
bun add httpiped-stream
```

## 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.0 |
| Published | 2014-06-29 |
| First published | 2014-06-29 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Fionn Kelleher |
| Maintainers | expr |
| Keywords | transform, stream, httpiped |

## Links

- npm: https://www.npmjs.com/package/httpiped-stream
- Repository: https://github.com/expr/httpiped-stream
- Issues: https://github.com/expr/httpiped-stream/issues
- npm.io page: https://npm.io/package/httpiped-stream

## Dependencies (1)

- [readable-stream](https://npm.io/package/readable-stream.md) ^1.0.27-1

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2014-06-29

## README

# httpiped-stream
> abstracted transform streams for httpiped

httpiped-stream allows you to create a Transform stream suitable for use with httpiped. The use case of this is to provide a similar method of creating "middleware" like Express.

## Installation

    npm install httpiped-stream

## Example

```js
var HTTPiped = require("httpiped");
var crStream = require("httpiped-stream").createStream;
var http = require("http");

var server = http.createServer();

var stream = new HTTPiped(server);

var setData = crStream(function (req, res, done) {
    req.someData = "Hello, world!\n";
    done();
});

var logger = crStream(function (req, res, done) {
    console.log("request from", req.connection.remoteAddress);
    done();
});

var handler = crStream(function (req, res, done) {
    res.end(req.someData);
    done();
});

stream.pipe(setData)
      .pipe(logger)
      .pipe(handler);

server.listen(8050);
```

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