stream-combiner2

WebJar for stream-combiner2

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

stream-combiner2
Last Version

Last Version

1.1.1
Release Date

Release Date

Type

Type

jar
Description

Description

stream-combiner2
WebJar for stream-combiner2
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/substack/stream-combiner2

Download stream-combiner2

How to add to project

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

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : duplexer2 jar [0.1.0,0.2)
org.webjars.npm : readable-stream jar [2.0.2,3)

Project Modules

There are no modules declared in this project.

stream-combiner2

This is a sequel to stream-combiner for streams3.

var combine = require('stream-combiner2')

Combine (stream1,...,streamN)

Turn a pipeline into a single stream. Combine returns a stream that writes to the first stream and reads from the last stream.

Streams1 streams are automatically upgraded to be streams3 streams.

Listening for 'error' will recieve errors from all streams inside the pipe.

var Combine = require('stream-combiner')
var es      = require('event-stream')

Combine(                                  // connect streams together with `pipe`
  process.openStdin(),                    // open stdin
  es.split(),                             // split stream to break on newlines
  es.map(function (data, callback) {      // turn this async function into a stream
    var repr = inspect(JSON.parse(data))  // render it nicely
    callback(null, repr)
  }),
  process.stdout                          // pipe it to stdout !
)

License

MIT

Versions

Version
1.1.1
1.0.2