Skip to content

A writable stream that can be piped to multiple other writable streams.

Notifications You must be signed in to change notification settings

ConnorChristie/Multi-Pipe-Stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multi-Pipe-Stream

A writable stream that can be piped to multiple other writable streams.

Installation

npm i multi-pipe-stream -S

API

pipeTo

// @stream - A stream to pipe to
myMultiStream.pipeTo(stream);

unpipeFrom

// @stream - A stream that is already being piped to
myMultiStream.unpipeFrom(stream);

Code Example

var MultiStream = require('multi-pipe-stream');

// Create a new MultiStream
var stream = new MultiStream();

// Pipe the original stream to the MultiStream
originalStream.pipe(stream);

// Add multiple pipes out from this stream to multiple destinations
stream.pipeTo(destStream1);
stream.pipeTo(destStream2);

// Remove a destination stream from being piped to
stream.unpipeFrom(destStream1);

About

A writable stream that can be piped to multiple other writable streams.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published