@nlib/stream-chain

Chain multiple streams.

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
00Mar 18, 2019Dec 19, 2017Minified + gzip package size for @nlib/stream-chain in KB

Readme

@nlib/stream-chain

Build Status Build status codecov dependencies Status devDependencies Status

Chain multiple streams.

Install

npm install @nlib/stream-chain

Usage

const {Transform} = require('stream');
const {chain} = require('@nlib/stream-chain');

class A extends Transform {...}
class B extends Transform {...}
class C extends Transform {...}

class D extends Transform {

  connector() {
    return chain(new A(), new B(), new C(), this);
  }

}

Javascript API

require('@nlib/stream-chain') returns {chain}.

chain(stream1, ..., streamN)

Chain the stream1 ... streamN and return the chained stream.

LICENSE

MIT

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.