@@ -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: v18.14.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
@@ -3022,10 +3027,16 @@ added: v17.0.0
3022
3027
3023
3028
<!-- YAML
3024
3029
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`.
3025
3035
-->
3026
3036
3027
3037
* ` src ` {Stream|Blob|ArrayBuffer|string|Iterable|AsyncIterable|
3028
- AsyncGeneratorFunction|AsyncFunction|Promise|Object}
3038
+ AsyncGeneratorFunction|AsyncFunction|Promise|Object|
3039
+ ReadableStream|WritableStream}
3029
3040
3030
3041
A utility method for creating duplex streams.
3031
3042
@@ -3045,6 +3056,8 @@ A utility method for creating duplex streams.
3045
3056
` writable ` into ` Stream ` and then combines them into ` Duplex ` where the
3046
3057
` Duplex ` will write to the ` writable ` and read from the ` readable ` .
3047
3058
* ` Promise ` converts into readable ` Duplex ` . Value ` null ` is ignored.
3059
+ * ` ReadableStream ` converts into readable ` Duplex ` .
3060
+ * ` WritableStream ` converts into writable ` Duplex ` .
3048
3061
* Returns: {stream.Duplex}
3049
3062
3050
3063
If an ` Iterable ` object containing promises is passed as an argument,
0 commit comments