Reading the official docs for the readline module, there is no end
event like other streams.
Trying
reader.on('end', cb);
Doesn't work.
How can I run a callback once there are no more lines to be read?
Nevermind, it's close
.
reader.on('close', cb);