Skip to content

Instantly share code, notes, and snippets.

@bhurlow
Created November 21, 2015 16:14
Show Gist options
  • Save bhurlow/279243f279076c00f320 to your computer and use it in GitHub Desktop.
Save bhurlow/279243f279076c00f320 to your computer and use it in GitHub Desktop.
es6 node stream inheritance
var stream = require('stream');
class Transformer extends stream.Transform {
constructor(options) {
super({
readableObjectMode : true,
writableObjectMode: true
});
}
_transform(chunk, encoding, done) {
this.push(chunk.email)
done()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment