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 230a984

Browse filesBrowse files
debadree25RafaelGSS
authored andcommitted
doc: include webstreams in finished() and Duplex.from() parameters
PR-URL: #46312 Backport-PR-URL: #46314 Refs: #46190 Refs: #46205 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 3658abe commit 230a984
Copy full SHA for 230a984

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎doc/api/stream.md‎

Copy file name to clipboardExpand all lines: doc/api/stream.md
+15-2Lines changed: 15 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -2579,6 +2579,9 @@ further errors except from `_destroy()` may be emitted as `'error'`.
25792579
<!-- YAML
25802580
added: v10.0.0
25812581
changes:
2582+
- version: v18.14.0
2583+
pr-url: https://github.com/nodejs/node/pull/46205
2584+
description: Added support for `ReadableStream` and `WritableStream`.
25822585
- version: v15.11.0
25832586
pr-url: https://github.com/nodejs/node/pull/37354
25842587
description: The `signal` option was added.
@@ -2598,7 +2601,9 @@ changes:
25982601
finished before the call to `finished(stream, cb)`.
25992602
-->
26002603

2601-
* `stream` {Stream} A readable and/or writable stream.
2604+
* `stream` {Stream|ReadableStream|WritableStream}
2605+
2606+
A readable and/or writable stream/webstream.
26022607

26032608
* `options` {Object}
26042609
* `error` {boolean} If set to `false`, then a call to `emit('error', err)` is
@@ -3022,10 +3027,16 @@ added: v17.0.0
30223027

30233028
<!-- YAML
30243029
added: v16.8.0
3030+
changes:
3031+
- version: REPLACEME
3032+
pr-url: https://github.com/nodejs/node/pull/46190
3033+
description: The `src` argument can now be a `ReadableStream` or
3034+
`WritableStream`.
30253035
-->
30263036

30273037
* `src` {Stream|Blob|ArrayBuffer|string|Iterable|AsyncIterable|
3028-
AsyncGeneratorFunction|AsyncFunction|Promise|Object}
3038+
AsyncGeneratorFunction|AsyncFunction|Promise|Object|
3039+
ReadableStream|WritableStream}
30293040

30303041
A utility method for creating duplex streams.
30313042

@@ -3045,6 +3056,8 @@ A utility method for creating duplex streams.
30453056
`writable` into `Stream` and then combines them into `Duplex` where the
30463057
`Duplex` will write to the `writable` and read from the `readable`.
30473058
* `Promise` converts into readable `Duplex`. Value `null` is ignored.
3059+
* `ReadableStream` converts into readable `Duplex`.
3060+
* `WritableStream` converts into writable `Duplex`.
30483061
* Returns: {stream.Duplex}
30493062

30503063
If an `Iterable` object containing promises is passed as an argument,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.