Write a Transform stream that splits incoming text chunks into lines.
MediumP2Coding
Write a Node.js Transform stream that takes incoming text chunks (chunk boundaries fall anywhere, including in the middle of a line or of a multi-byte character) and emits one line per output item. Explain how you handle the partial last line and how the stream ends.
Saved automatically
Write or say your answer first, then compare it with the model answer.
Saved automatically