This checks for leftover contents in "line" when the close event on the stream fires and emits it. I hadn't realized that there's is also an unstable "readline" core module, but it has the same problem.
I also added \r as a newline character (buffer code 13).
This checks for leftover contents in "line" when the close event on the stream fires and emits it. I hadn't realized that there's is also an unstable "readline" core module, but it has the same problem.
I also added \r as a newline character (buffer code 13).