# header-stream

> ``` js var header = require('header-stream')

Latest version **0.1.4** (published 2012-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install header-stream
pnpm add header-stream
yarn add header-stream
bun add header-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.4 |
| Published | 2012-11-07 |
| First published | 2012-11-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | 'Dominic Tarr' |
| Maintainers | dominictarr |

## Links

- npm: https://www.npmjs.com/package/header-stream
- Repository: https://github.com/dominictarr/header-stream
- npm.io page: https://npm.io/package/header-stream

## Recent versions

- 0.1.4 (latest) — 2012-11-07
- 0.1.3 — 2012-11-06
- 0.1.2 — 2012-11-06
- 0.1.1 — 2012-11-06
- 0.1.0 — 2012-11-06
- 0.0.2 — 2012-11-06
- 0.0.1 — 2012-11-06

## README

# header-stream

``` js
var header = require('header-stream')

//patch a stream so that now it has a header.
stream = header(stream)


//this will be emitted before the first 'data' event!

stream.on('header', function (meta) {
  //meta is the header.
  //also, stream.meta will be set.
  console.log(stream.meta)
})

//set header values with either of these patterns.
stream.setHeader('key1', value1)
stream.setHeader({key2: value2})

//force the header to be written.
//(othewise it will wait until the first .write()
stream.writeHead()
```

## License

MIT

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