Streams are objects that allow you to read and write data from a source in a continuous manner. There are four main categories of streams in Node.js: readable, writable, duplex, and transform. Each stream is an eventEmitter instance that emits different events at various intervals.
The readable stream is a stream that is used for read operations. The writable stream as the name suggests is a stream used for write operations. A duplex stream is a stream that performs both read and write operations. A transform stream is a stream that uses it input to compute an output. The streams throw several events since they are eventEmitter instances. These events are used to track and monitor the stream.
Streams are divided into readable and writable streams. The name suggests that the writable stream is a stream for writing data. A duplex stream is a stream that performs both reading and writing operations. A transform stream uses input to compute an output. The streams throw numerous events since they are eventEmitter instances. These events are utilized to track and monitor the stream.