Message from JavaScript discussions

June 2019

— Because you have an end event

— 

And you'd need to set stdin to raw mode, and then parse out all the terminal escape sequences yourself

— Being new to Js (or any other programming language really) i have no clue about that thing

— What do you actually want to do?

— Bittersweet silence

— An exercise

— Very illuminating

— Reading from a file and counting the number of lines in it

— I thought that js had an EOF value, apparently it doesn't

— You just want readline then

— Wasn't that a module?

— For general stream handling, read this:
https://nodejs.org/api/stream.html#stream_stream

For reading lines:
https://nodejs.org/api/readline.html#readline_readline

Message permanent page