1.0.0 • Published 9 years ago

stream-joint v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

stream-joint

Combine/merge streams into a single through stream so that writing to the through stream writes to all streams.

Handy for chaining writable streams.

Examples

Chaining writable streams

var fs = require("fs");
var joint = require('stream-joint');
var streams = joint();

streams
  .pipe(joint(process.stdout))
  .pipe(joint(fs.createWriteStream('./temp.log')));

streams
  .write('Let's write to stdout and to a log file);

Merging writable streams

var fs = require("fs");
var joint = require('stream-joint');
var streams = joint(process.stdout, fs.createWriteStream('./temp.log'));

streams
  .write('Let's write to stdout and to a log file);