Stream Writable Lab
Medium
0.0% Acceptance
In this lab, you will learn how to work with stream.Writable
in Node.js by implementing a writable stream that logs the data it receives. stream.Writable
is an abstract class and you have to implement two methods: _write
and _final
. _write
will be called with the data that the stream is receiving, and _final
will be called when the stream is ended. Implement these two methods and create a writable stream instance. Then, test your implementation by writing some data to it and ending the stream.
Concepts you will learn:
- How to create a custom writable stream
- Using the
_write
method - Using the
_final
method