经典流互操作


🌐 Classic stream interop

这些实用函数在经典的 stream.Readable/stream.Writable 流与 stream/iter API 之间搭建桥梁。

🌐 These utility functions bridge between classic stream.Readable/stream.Writable streams and the stream/iter API.

fromReadable()fromWritable() 都接受动态类型对象——它们不要求输入直接继承 stream.Readablestream.Writable。每个函数的最小契约如下所述。

🌐 Both fromReadable() and fromWritable() accept duck-typed objects -- they do not require the input to extend stream.Readable or stream.Writable directly. The minimum contract is described below for each function.