Streams are objects that let you read data from a source or write data to a destination in continuous fashion. In Node.js, there are four types of streams.
- Readable - Stream which is used for read operation.
- Writable - Stream which is used for write operation.
- Duplex - Stream which can be used for both read and write operation.
- Transform - A type of duplex stream where the output is computed based on input.
Итог
Key takeaway for interview: What are streams?