Skip to content

Instantly share code, notes, and snippets.

@mattrobenolt
Created April 12, 2012 18:59
Show Gist options
  • Save mattrobenolt/2370108 to your computer and use it in GitHub Desktop.
Save mattrobenolt/2370108 to your computer and use it in GitHub Desktop.
var SimpleStream = function(){
Stream.call(this);
this.readable = true;
};
util.inherits(SimpleStream, Stream);
SimpleStream.prototype.write = function(chunk) {
this.emit('data', chunk);
};
SimpleStream.prototype.end = function() {
this.emit('end');
this.emit('close');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment