Skip to content

Instantly share code, notes, and snippets.

@Sequoia
Last active December 28, 2015 03:59
Show Gist options
  • Save Sequoia/7438604 to your computer and use it in GitHub Desktop.
Save Sequoia/7438604 to your computer and use it in GitHub Desktop.
https://gist.github.com/naomik/7178262 Now With More Dependencies!!
// 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