Skip to content

Instantly share code, notes, and snippets.

@RamonL
Created May 27, 2016 01:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RamonL/81ac9dc4b84e6c535a6ef4542b9686f9 to your computer and use it in GitHub Desktop.
Save RamonL/81ac9dc4b84e6c535a6ef4542b9686f9 to your computer and use it in GitHub Desktop.
var through = require('through2');
var tr = through(write, end);
function write(buf, encoding, next){
setTimeOut(() => {
this.push(buf.toString().toUpperCase());
next();
}, 10000)
}
function end(done){
process.stdin.pipe(tr).pipe(process.stdout);
done();
}
process.stdin.pipe(tr).pipe(process.stdout);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment