Skip to content

Commit

Permalink
doc: document pipeline with end option
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
aloisklink authored and marco-ippolito committed Jun 17, 2024
1 parent 9ca114e commit 66575c9
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ or `require('node:stream').promises`.

<!-- YAML
added: v15.0.0
changes:
- version:
- v18.0.0
- v17.2.0
- v16.14.0
pr-url: https://github.com/nodejs/node/pull/40886
description: Add the `end` option, which can be set to `false` to prevent
automatically closing the destination stream when the source
ends.
-->

* `streams` {Stream\[]|Iterable\[]|AsyncIterable\[]|Function\[]}
Expand All @@ -76,9 +85,11 @@ added: v15.0.0
* `destination` {Stream|Function}
* `source` {AsyncIterable}
* Returns: {Promise|AsyncIterable}
* `options` {Object}
* `options` {Object} Pipeline options
* `signal` {AbortSignal}
* `end` {boolean}
* `end` {boolean} End the destination stream when the source stream ends.
Transform streams are always ended, even if this value is `false`.
**Default:** `true`.
* Returns: {Promise} Fulfills when the pipeline is complete.

```cjs
Expand Down

0 comments on commit 66575c9

Please sign in to comment.