GeezerVison is showing github.com — doc: document pipeline with `end` option · nodejs/node@80fa675
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 +13-2Lines changed: 13 additions & 2 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -65,6 +65,15 @@ or `require('node:stream').promises`. |
65 | 65 |
|
66 | 66 | <!-- YAML |
67 | 67 | added: v15.0.0 |
| 68 | +changes: |
| 69 | + - version: |
| 70 | + - v18.0.0 |
| 71 | + - v17.2.0 |
| 72 | + - v16.14.0 |
| 73 | + pr-url: https://github.com/nodejs/node/pull/40886 |
| 74 | + description: Add the `end` option, which can be set to `false` to prevent |
| 75 | + automatically closing the destination stream when the source |
| 76 | + ends. |
68 | 77 | --> |
69 | 78 |
|
70 | 79 | * `streams` {Stream\[]|Iterable\[]|AsyncIterable\[]|Function\[]} |
@@ -76,9 +85,11 @@ added: v15.0.0 |
76 | 85 | * `destination` {Stream|Function} |
77 | 86 | * `source` {AsyncIterable} |
78 | 87 | * Returns: {Promise|AsyncIterable} |
79 | | -* `options` {Object} |
| 88 | +* `options` {Object} Pipeline options |
80 | 89 | * `signal` {AbortSignal} |
81 | | - * `end` {boolean} |
| 90 | + * `end` {boolean} End the destination stream when the source stream ends. |
| 91 | + Transform streams are always ended, even if this value is `false`. |
| 92 | + **Default:** `true`. |
82 | 93 | * Returns: {Promise} Fulfills when the pipeline is complete. |
83 | 94 |
|
84 | 95 | ```cjs |
|