Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: update stream.md #9468

Closed
wants to merge 3 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -440,10 +440,12 @@ occurs, the `callback` *may or may not* be called with the error as its
first argument. To reliably detect write errors, add a listener for the
`'error'` event.

The return value indicates whether the written `chunk` was buffered internally
and the buffer has exceeded the `highWaterMark` configured when the stream was
created. If `false` is returned, further attempts to write data to the stream
should be paused until the [`'drain'`][] event is emitted.
The return value is `true` if the internal buffer does not exceed
`highWaterMark` configured when the stream was created after admitting
`chunk`. If `false` is returned, further attempts to write data to the stream
should stop until the [`'drain'`][] event is emitted. However, the
`false` return value is only advisory and the writable stream will
unconditionally accept `chunk` even if it has not not been allowed to drain.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: accept -> accept and buffer


A Writable stream in object mode will always ignore the `encoding` argument.

Expand Down