line-reader
line-reader copied to clipboard
Any way to stop/abort reading a file in the eachLine method?
I need to stop reading a file once it gets to certain line & just stop whatever else is going on in the eachLine part. How can I do that? I've read through the docs and searched on the internet but found nothing that works. Please tell me it's possible to do
Can't you just return false in the eachLine
callback? The docs state: If the callback returns false, reading will stop and the file will be closed.