Last active
December 28, 2015 03:59
-
-
Save Sequoia/7438604 to your computer and use it in GitHub Desktop.
https://gist.github.com/naomik/7178262
Now With More Dependencies!!
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
// riff off https://gist.github.com/naomik/7178262 | |
var through = require('through'); | |
var doubler = function doubler(data){ | |
data = data.toString(); | |
this.queue(data + data); | |
}; | |
var uppercaser = function uppercaser(data){ | |
this.queue(data.toString().toUpperCase()); | |
}; | |
process.stdin | |
.pipe(through(doubler)) | |
.pipe(through(uppercaser)) | |
.pipe(process.stdout); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment