Skip to content

Commit 1a4d34e

Browse files
jasnelldanielleadams
authored andcommitted
doc: clarify descriptions of _writev chunks argument
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]>
1 parent a38ad07 commit 1a4d34e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

doc/api/stream.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -2162,8 +2162,14 @@ user programs.
21622162

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

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

0 commit comments

Comments
 (0)