stream-connect
Create a pipeline of connected streams.
Example
> streamConnect = require("stream-connect")
> PassThrough = require("stream").PassThrough
> pass1 = PassThrough()
> pass1.setEncoding("utf8")
> pass1.on("data", console.log.bind(console, "pass1"))
> pass2 = PassThrough()
> pass2.setEncoding("utf8")
> pass2.on("data", console.log.bind(console, "pass2"))
> pass1.write("testing")
pass1 testing
> connected = streamConnect(pass1, pass2)
> connected.write("testing")
pass1 testing
pass2 testing
connect(one, two) ⇒ Transform
⏏
Connects two duplex streams together.
Kind: Exported function
Param | Type | Description |
---|
one | Duplex | source stream |
two | Duplex | dest stream, to be connected to |
© 2015 Lloyd Brookes <75pound@gmail.com>. Documented by jsdoc-to-markdown.