How can you implement a custom writable stream in Node.js?
- util.promisify
- stream.pipeline
- Writable class
- Readable class
To implement a custom writable stream in Node.js, you should extend the Writable class and implement its _write method. This method is responsible for processing and writing data to the stream. The other options are not used for creating custom writable streams.
Loading...
Related Quiz
- If a package is required for running the tests, it should ideally be listed under ________.
- Which method would you use to concatenate multiple buffers in Node.js?
- In NoSQL databases like MongoDB, how can you ensure data consistency across distributed databases?
- What is the primary purpose of setting up test suites in a testing framework?
- In the fs module, how can you create a new file?