The
writable.writableHighWaterMark property is an inbuilt application programming interface of stream module which is used to check the
highWaterMark value which was passed while creating the Writable.
Syntax:
writable.writableHighWaterMark
Return Value: It returns the value of
highwatermark if it is set otherwise returns the default value.
Below examples illustrate the use of
writable.writableHighWaterMark property in Node.js:
Example 1:
Output:
hi
GFG
16384
Here, the default value is returned.
Example 2:
Output:
1234
Here, the value of
highWaterMark which was set while creating Writable stream is returned.
Reference: https://nodejs.org/api/stream.html#stream_writable_writablehighwatermark