# debug-stream

> use the debug module on a stream

Latest version **3.0.1** (published 2015-07-24) · MIT license · 0 weekly downloads

## Install

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

## 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 | 3.0.1 |
| Published | 2015-07-24 |
| First published | 2014-06-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 15 |
| Author | Mathias Buus |
| Maintainers | mafintosh |
| Keywords | debug, stream |

## Links

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

## Dependencies (2)

- [debug](https://npm.io/package/debug.md) ^2.2.0
- [through2](https://npm.io/package/through2.md) ^2.0.0

## 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

- 3.0.1 (latest) — 2015-07-24
- 3.0.0 — 2015-07-24
- 2.1.0 — 2015-07-24
- 2.0.2 — 2014-10-05
- 2.0.1 — 2014-06-19
- 2.0.0 — 2014-06-17
- 1.1.0 — 2014-06-17
- 1.0.0 — 2014-06-17

## README

# debug-stream

Use the debug module on a stream

```
npm install debug-stream
```

## Usage

``` js
var debugStream = require('debug-stream')('my-app')

process.stdin
  .pipe(debugStream())
  .resume() // just drain it

// or if you're already using debug

var debug = require('debug')('my-app')
var debugStream = require('debug-stream')(debug)

process.stdin
  .pipe(debugStream())
  .resume()
```

Running the above program with `DEBUG=*` will use the [debug module](https://github.com/visionmedia/debug) on every buffer/object
in the stream.

You can add an optional format string as well

``` js
var debugStream = require('debug-stream')('my-app')

process.stdin
  .pipe(debugStream('process.stdin: %s'))
  .resume() // just drain it
```

The debug stream behaives as pass through stream so can just insert it in any existing pipe chain

``` js
inputStream
  .pipe(debugStream())
  .pipe(outputStream)
```
## Browser support

As with debug, this module also supports the browser environment through either browserify or webpack.

To enable the functionality, you need to run `require('debug').enable('*')` in your console. It will persist
this setting in localStorage, until you run `require('debug').disable()`.

## License

MIT

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