doc: clarify descriptions of _writev chunks argument

Fixes: https://github.com/nodejs/node/issues/36789
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
James M Snell authored and Michaël Zasso committed 2021-05-01 12:24:51 +02:00
1 parent cf0fa7fa2f
commit f605bc00ae
1 file changed
+8 -2
+8 -2
View File
@@ -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.