Readable stream

A Node.js stream you read data from, such as a file being read, an incoming HTTP request or a socket.

In more detail

It fills an internal buffer from its source and hands chunks to the consumer through data events, read() calls or for await loops. A custom one calls this.push(chunk) to add data and this.push(null) to signal the end.

Related terms

Taught in

References