stdout-stream

WebJar for stdout-stream

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

stdout-stream
Last Version

Last Version

1.4.1
Release Date

Release Date

Type

Type

jar
Description

Description

stdout-stream
WebJar for stdout-stream
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/mafintosh/stdout-stream

Download stdout-stream

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/stdout-stream/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>stdout-stream</artifactId>
    <version>1.4.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/stdout-stream/
implementation 'org.webjars.npm:stdout-stream:1.4.1'
// https://jarcasting.com/artifacts/org.webjars.npm/stdout-stream/
implementation ("org.webjars.npm:stdout-stream:1.4.1")
'org.webjars.npm:stdout-stream:jar:1.4.1'
<dependency org="org.webjars.npm" name="stdout-stream" rev="1.4.1">
  <artifact name="stdout-stream" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='stdout-stream', version='1.4.1')
)
libraryDependencies += "org.webjars.npm" % "stdout-stream" % "1.4.1"
[org.webjars.npm/stdout-stream "1.4.1"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : readable-stream jar [2.0.1,3)

Project Modules

There are no modules declared in this project.

stdout-stream

Non-blocking stdout stream

npm install stdout-stream

build status dat

Rant

Try saving this example as example.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

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

Versions

Version
1.4.1
1.4.0