Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 80fa675

Browse filesBrowse files
aloisklinktargos
authored andcommitted
doc: document pipeline with end option
There is currently no documentation about what the `end` option in `stream.promises.pipeline` does. Refs: #40886 Refs: #34805 (comment) Fixes: #45821 PR-URL: #48970 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 5469adf commit 80fa675
Copy full SHA for 80fa675

File tree

Expand file treeCollapse file tree

1 file changed

+13
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+13
-2
lines changed
Open diff view settings
Collapse file

‎doc/api/stream.md‎

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 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.