Skip to content

Commit

Permalink
doc: clarify descriptions of _writev chunks argument
Browse files Browse the repository at this point in the history
Fixes: #36789
Signed-off-by: James M Snell <[email protected]>

PR-URL: #36822
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
  • Loading branch information
jasnell authored and danielleadams committed Jan 12, 2021
1 parent a38ad07 commit 1a4d34e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -2162,8 +2162,14 @@ user programs.

#### `writable._writev(chunks, callback)`

* `chunks` {Object[]} The chunks to be written. Each chunk has following
format: `{ chunk: ..., encoding: ... }`.
* `chunks` {Object[]} The data to be written. The value is an array of {Object}
that each represent a discreet chunk of data to write. The properties of
these objects are:
* `chunk` {Buffer|string} A buffer instance or string containing the data to
be written. The `chunk` will be a string if the `Writable` was created with
the `decodeStrings` option set to `false` and a string was passed to `write()`.
* `encoding` {string} The character encoding of the `chunk`. If `chunk` is
a `Buffer`, the `encoding` will be `'buffer`.
* `callback` {Function} A callback function (optionally with an error
argument) to be invoked when processing is complete for the supplied chunks.

Expand Down

0 comments on commit 1a4d34e

Please sign in to comment.