Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7ea65be

Browse files
aloisklinkaduh95
authored andcommittedMay 11, 2024
doc: document pipeline with end option
There is currently no documentation about what the `end` option in `stream.promises.pipeline` does. Refs: nodejs#40886 Refs: nodejs#34805 (comment) Fixes: nodejs#45821
1 parent 62dd5a8 commit 7ea65be

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed
 

‎doc/api/stream.md

+13-2
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,15 @@ or `require('node:stream').promises`.
6565

6666
<!-- YAML
6767
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.
6877
-->
6978

7079
* `streams` {Stream\[]|Iterable\[]|AsyncIterable\[]|Function\[]}
@@ -76,9 +85,11 @@ added: v15.0.0
7685
* `destination` {Stream|Function}
7786
* `source` {AsyncIterable}
7887
* Returns: {Promise|AsyncIterable}
79-
* `options` {Object}
88+
* `options` {Object} Pipeline options
8089
* `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`.
8293
* Returns: {Promise} Fulfills when the pipeline is complete.
8394

8495
```cjs

0 commit comments

Comments
 (0)
Please sign in to comment.