Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add pipeline and finished to stream/promises doc #45832

Merged
merged 8 commits into from
Dec 15, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,34 @@ functions for streams that return `Promise` objects rather than using
callbacks. The API is accessible via `require('node:stream/promises')`
or `require('node:stream').promises`.

### `stream.pipeline(source[, ...transforms], destination, options)`

### `stream.pipeline(streams, options)`
marco-ippolito marked this conversation as resolved.
Show resolved Hide resolved

* `streams` {Stream\[]|Iterable\[]|AsyncIterable\[]|Function\[]}
* `source` {Stream|Iterable|AsyncIterable|Function}
* Returns: {Promise<AsyncIterable>}
marco-ippolito marked this conversation as resolved.
Show resolved Hide resolved
* `...transforms` {Stream|Function}
* `source` {AsyncIterable}
* Returns: {Promise<AsyncIterable>}
marco-ippolito marked this conversation as resolved.
Show resolved Hide resolved
* `destination` {Stream|Function}
* `source` {AsyncIterable}
* Returns: {Promise<AsyncIterable>}
marco-ippolito marked this conversation as resolved.
Show resolved Hide resolved
* `options` {Object}
* `signal` {AbortSignal}
* `end` {boolean}
* Returns: {Promise<void>}
marco-ippolito marked this conversation as resolved.
Show resolved Hide resolved

### `stream.finished(stream, options)`
marco-ippolito marked this conversation as resolved.
Show resolved Hide resolved

* `stream` {Stream}
* `options` {Object}
* `error` {boolean|undefined}
* `readable` {boolean|undefined}
* `writable` {boolean|undefined}
* `signal`: {AbortSignal|undefined}
* Returns: {Promise<void>}
marco-ippolito marked this conversation as resolved.
Show resolved Hide resolved

### Object mode

All streams created by Node.js APIs operate exclusively on strings and `Buffer`
Expand Down