Created
July 29, 2014 05:31
-
-
Save iarna/ecb626ca24c92b43fc75 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var stream = require('stream'); | |
function dosomething() { | |
var out = new stream.PassThrough(); | |
out.write('two'); | |
return out; | |
} | |
var source = new stream.PassThrough() | |
source.pipe(dosomething()).pipe(process.stdout) | |
source.write('one') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment