@@ -2579,6 +2579,9 @@ further errors except from `_destroy()` may be emitted as `'error'`.
2579
2579
<!-- YAML
2580
2580
added: v10.0.0
2581
2581
changes:
2582
+ - version: v19.5.0
2583
+ pr-url: https://github.com/nodejs/node/pull/46205
2584
+ description: Added support for `ReadableStream` and `WritableStream`.
2582
2585
- version: v15.11.0
2583
2586
pr-url: https://github.com/nodejs/node/pull/37354
2584
2587
description: The `signal` option was added.
@@ -2598,7 +2601,9 @@ changes:
2598
2601
finished before the call to `finished(stream, cb)`.
2599
2602
-->
2600
2603
2601
- * ` stream ` {Stream} A readable and/or writable stream.
2604
+ * ` stream ` {Stream|ReadableStream|WritableStream}
2605
+
2606
+ A readable and/or writable stream/webstream.
2602
2607
2603
2608
* ` options ` {Object}
2604
2609
* ` error ` {boolean} If set to ` false ` , then a call to ` emit('error', err) ` is
@@ -3011,10 +3016,16 @@ added: v17.0.0
3011
3016
3012
3017
<!-- YAML
3013
3018
added: v16.8.0
3019
+ changes:
3020
+ - version: v19.5.0
3021
+ pr-url: https://github.com/nodejs/node/pull/46190
3022
+ description: The `src` argument can now be a `ReadableStream` or
3023
+ `WritableStream`.
3014
3024
-->
3015
3025
3016
3026
* ` src ` {Stream|Blob|ArrayBuffer|string|Iterable|AsyncIterable|
3017
- AsyncGeneratorFunction|AsyncFunction|Promise|Object}
3027
+ AsyncGeneratorFunction|AsyncFunction|Promise|Object|
3028
+ ReadableStream|WritableStream}
3018
3029
3019
3030
A utility method for creating duplex streams.
3020
3031
@@ -3034,6 +3045,8 @@ A utility method for creating duplex streams.
3034
3045
` writable ` into ` Stream ` and then combines them into ` Duplex ` where the
3035
3046
` Duplex ` will write to the ` writable ` and read from the ` readable ` .
3036
3047
* ` Promise ` converts into readable ` Duplex ` . Value ` null ` is ignored.
3048
+ * ` ReadableStream ` converts into readable ` Duplex ` .
3049
+ * ` WritableStream ` converts into writable ` Duplex ` .
3037
3050
* Returns: {stream.Duplex}
3038
3051
3039
3052
If an ` Iterable ` object containing promises is passed as an argument,
0 commit comments