Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
155
rated 0 times [  157] [ 2]  / answers: 1 / hits: 17764  / 10 Years ago, mon, april 7, 2014, 12:00:00

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?


More From » node.js

 Answers
16

Nevermind, it's close.



reader.on('close', cb);

[#71574] Saturday, April 5, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
masonm

Total Points: 167
Total Questions: 87
Total Answers: 103

Location: Rwanda
Member since Wed, Jun 8, 2022
2 Years ago
masonm questions
;