Description
The return value indicates whether the written
chunk
was buffered internally and the buffer has exceeded thehighWaterMark
configured when the stream was created. Iffalse
is returned, further attempts to write data to the stream should be paused until the'drain'
event is emitted.
This suggests that when writable.write(chunk)
returns false
, the passed chunk
was not buffered. In reality, write()
always unconditionally buffers the chunk
regardless of what it returns. Its return value is only advisory.
I would suggest language like this
The return value is
true
if the internal buffer does not exceedhighWaterMark
configured when the stream was created after admittingchunk
. Iffalse
is returned, further attempts to write data to the stream should be paused until the'drain'
event is emitted. However, thefalse
return value is only advisory and the writable stream will unconditionally acceptchunk
even if it has not not been allowed to drain.