Skip to content

Commit f605bc0

Browse files
jasnelltargos
authored andcommittedMay 1, 2021
doc: clarify descriptions of _writev chunks argument
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>
1 parent cf0fa7f commit f605bc0

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
@@ -2022,8 +2022,14 @@ user programs.
20222022

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

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

0 commit comments

Comments
 (0)
Please sign in to comment.