Understanding stream.ReadableState in Node.js
In this lab, you will learn about the
stream.ReadableState class in Node.js, which holds the state of a readable stream. This class is not meant to be instantiated directly but is created by the readable stream internally.
To complete this lab, you will be required to implement different functionalities related to the
- ReadableState: This class holds the state of a readable stream in Node.js. You can access this class through
- ObjectMode: When the stream reads data in
objectMode, it doesn't expect the data to be in any particular format, such as a buffer or string.
- HighWaterMark: This is a number that denotes the internal buffer size of a stream.
- Encoding: An optional string parameter that specifies the character encoding when the stream is in
In this lab, we will cover challenges related to ObjectMode, HighWaterMark, Encoding and other important functionalities of the