Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A simple implementation of Stream.Duplex spec in Node.js
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
example
lib
README.md
package.json

README.md

DuplexBufferStream

A simple implementation of Stream.Duplex spec in Node.js.

Example

tee.js
var DuplexBufferStream = require('duplexbufferstream');
var fs = require('fs');

var tee = new DuplexBufferStream();
process.stdin.pipe(tee).pipe(process.stdout);

var teeout = process.argv.length > 2 ? fs.createWriteStream(process.argv[2]) : process.stderr;
tee.on('data', function(chunk) {
    teeout.write(chunk);
});

Execution

$ echo "hello world" | node tee.js tee.output.log; cat tee.output.log
hello world
hello world
$
Something went wrong with that request. Please try again.