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 <luigipinca@gmail.com>
  • Loading branch information
aloisklink authored and aduh95 committed May 12, 2024
1 parent f3f1aec commit ca2f874
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions doc/api/stream.md
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

Check warning on line 73 in doc/api/stream.md

View workflow job for this annotation

GitHub Actions / lint-pr-url

pr-url doesn't match the URL of the current PR.
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 ca2f874

Please sign in to comment.