A utility method for creating duplex streams.
Streamconverts writable stream into writableDuplexand readable stream toDuplex.Blobconverts into readableDuplex.stringconverts into readableDuplex.ArrayBufferconverts into readableDuplex.AsyncIterableconverts into a readableDuplex. Cannot yieldnull.AsyncGeneratorFunctionconverts into a readable/writable transformDuplex. Must take a sourceAsyncIterableas first parameter. Cannot yieldnull.AsyncFunctionconverts into a writableDuplex. Must return eithernullorundefinedObject ({ writable, readable })convertsreadableandwritableintoStreamand then combines them intoDuplexwhere theDuplexwill write to thewritableand read from thereadable.Promiseconverts into readableDuplex. Valuenullis ignored.