Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Readable.prototype.pipe = function(dest) {
this.on('end', dest.end.bind(dest));;
function flow() {
var chunk;
while (chunk = {
var written = dest.write(chunk);
if (!written) {
dest.once('drain', flow.bind(this));
this.once('readable', flow);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.