How to close a readable stream in Node.js?
var input = fs.createReadStream(\'lines.txt\'); input.on(\'data\', function(data) { // after closing the strea
Today, in Node 10
readableStream.destroy()
is the official way to close a readable stream
see https://nodejs.org/api/stream.html#stream_readable_destroy_error