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 996bac0

Browse filesBrowse files
debadree25ruyadorno
authored andcommitted
doc: include webstreams in finished() and Duplex.from() parameters
PR-URL: #46312 Refs: #46190 Refs: #46205 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 43cad78 commit 996bac0
Copy full SHA for 996bac0

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
@@ -2601,6 +2601,9 @@ further errors except from `_destroy()` may be emitted as `'error'`.
26012601
<!-- YAML
26022602
added: v10.0.0
26032603
changes:
2604+
- version: v19.5.0
2605+
pr-url: https://github.com/nodejs/node/pull/46205
2606+
description: Added support for `ReadableStream` and `WritableStream`.
26042607
- version: v15.11.0
26052608
pr-url: https://github.com/nodejs/node/pull/37354
26062609
description: The `signal` option was added.
@@ -2620,7 +2623,9 @@ changes:
26202623
finished before the call to `finished(stream, cb)`.
26212624
-->
26222625

2623-
* `stream` {Stream} A readable and/or writable stream.
2626+
* `stream` {Stream|ReadableStream|WritableStream}
2627+
2628+
A readable and/or writable stream/webstream.
26242629

26252630
* `options` {Object}
26262631
* `error` {boolean} If set to `false`, then a call to `emit('error', err)` is
@@ -3029,10 +3034,16 @@ added: v17.0.0
30293034

30303035
<!-- YAML
30313036
added: v16.8.0
3037+
changes:
3038+
- version: v19.5.0
3039+
pr-url: https://github.com/nodejs/node/pull/46190
3040+
description: The `src` argument can now be a `ReadableStream` or
3041+
`WritableStream`.
30323042
-->
30333043

30343044
* `src` {Stream|Blob|ArrayBuffer|string|Iterable|AsyncIterable|
3035-
AsyncGeneratorFunction|AsyncFunction|Promise|Object}
3045+
AsyncGeneratorFunction|AsyncFunction|Promise|Object|
3046+
ReadableStream|WritableStream}
30363047

30373048
A utility method for creating duplex streams.
30383049

@@ -3052,6 +3063,8 @@ A utility method for creating duplex streams.
30523063
`writable` into `Stream` and then combines them into `Duplex` where the
30533064
`Duplex` will write to the `writable` and read from the `readable`.
30543065
* `Promise` converts into readable `Duplex`. Value `null` is ignored.
3066+
* `ReadableStream` converts into readable `Duplex`.
3067+
* `WritableStream` converts into writable `Duplex`.
30553068
* Returns: {stream.Duplex}
30563069

30573070
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.