Skip to content

Instantly share code, notes, and snippets.

@calvinmetcalf
Created April 2, 2020 15:20
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 calvinmetcalf/00d39b7add0ff456741afe1aee4cce9e to your computer and use it in GitHub Desktop.
Save calvinmetcalf/00d39b7add0ff456741afe1aee4cce9e to your computer and use it in GitHub Desktop.
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