# stdout-stream

> Non-blocking stdout stream

Latest version **2.0.0** (published 2022-08-09) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2022-08-09 |
| First published | 2014-04-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/stdout-stream) |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 38 |
| Maintainers | mafintosh |

## Links

- npm: https://www.npmjs.com/package/stdout-stream
- Repository: https://github.com/mafintosh/stdout-stream
- Homepage: https://github.com/mafintosh/stdout-stream#readme
- Issues: https://github.com/mafintosh/stdout-stream/issues
- npm.io page: https://npm.io/package/stdout-stream

## Dependencies (1)

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

## Recent versions

- 2.0.0 (latest) — 2022-08-09
- 1.4.1 — 2018-08-24
- 1.4.0 — 2015-06-23
- 1.3.0 — 2014-08-27
- 1.2.0 — 2014-04-19
- 1.1.0 — 2014-04-18
- 1.0.5 — 2014-04-18
- 1.0.4 — 2014-04-18
- 1.0.3 — 2014-04-17
- 1.0.2 — 2014-04-17
- 1.0.1 — 2014-04-17
- 1.0.0 — 2014-04-17

## README

# stdout-stream

Non-blocking stdout stream

	npm install stdout-stream

[![build status](http://img.shields.io/travis/mafintosh/level-filesystem.svg?style=flat)](http://travis-ci.org/mafintosh/stdout-stream)
![dat](http://img.shields.io/badge/Development%20sponsored%20by-dat-green.svg?style=flat)


## Rant

Try saving this example as `example.js`

``` js
console.error('start');
process.stdout.write(new Buffer(1024*1024));
console.error('end');
```

And run the following program

```
node example.js | sleep 1000
```

The program will never print `end` since stdout in node currently is blocking - even when its being piped (!).

stdout-stream tries to fix this by being a stream that writes to stdout but never blocks

## Usage

``` js
var stdout = require('stdout-stream');

stdout.write('hello\n'); // write should NEVER block
stdout.write('non-blocking\n')
stdout.write('world\n');
```

`stdout-stream` should behave in the same way as `process.stdout` (i.e. do not end on pipe etc)

## License

MIT

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