JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 263015
  • Score
    100M100P100Q11275F
  • License MIT

Create a pipeline of connected streams

Package Exports

  • stream-connect

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (stream-connect) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

view on npm npm module downloads per month Build Status Dependency Status js-standard-style

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.