Skip to content

Instantly share code, notes, and snippets.

@calvinmetcalf
Created April 2, 2020 15:20
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Class MyStream extends stream.Writable {
constructor() {
super({objectMode: true})
}
_write(chunk, _, next) {
next();
}
_final(done) {
done();
}
}
const mystream = new MyStream();
const mystream = new stream.Writable({
objectMode: true,
write(chunk, _, next) {
next();
},
final(done) {
done();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment