Node.js · Middle · Question 15 of 75

How can you read a readable stream line by line or chunk by chunk with async/await?

Explanation

Readable streams are async iterables. For lines, combine it with readline.createInterface({ input: stream }), which is also async iterable.

Further reading

Problem with a question

Node.js · Middle · question 15

Test yourself

Take the Node.js · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz