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 <jasnell@gmail.com>

PR-URL: #36822
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
  • Loading branch information
jasnell authored and targos committed May 1, 2021
1 parent cf0fa7f commit f605bc0
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 @@ -2022,8 +2022,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 f605bc0

Please sign in to comment.