GeezerVison is showing github.com — doc: clarify descriptions of _writev chunks argument · nodejs/node@f605bc0
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: doc/api/stream.md +8-2Lines changed: 8 additions & 2 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2022,8 +2022,14 @@ user programs. |
2022 | 2022 |
|
2023 | 2023 | #### `writable._writev(chunks, callback)` |
2024 | 2024 |
|
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`. |
2027 | 2033 | * `callback` {Function} A callback function (optionally with an error |
2028 | 2034 | argument) to be invoked when processing is complete for the supplied chunks. |
2029 | 2035 |
|
|