stream.Readable.toWeb(streamReadable[, options])


稳定性: 1 - 实验性的

¥Stability: 1 - Experimental

  • streamReadable <stream.Readable>

  • options <Object>

    • strategy <Object>

      • highWaterMark <number> 在从给定的 stream.Readable 读取数据时应用背压之前的最大内部队列大小(创建的 ReadableStream)。如果未提供值,将从给定的 stream.Readable 中获取。

        ¥highWaterMark <number> The maximum internal queue size (of the created ReadableStream) before backpressure is applied in reading from the given stream.Readable. If no value is provided, it will be taken from the given stream.Readable.

      • size <Function> 给定数据块大小的函数。如果未提供任何值,则所有块的大小将为 1

        ¥size <Function> A function that size of the given chunk of data. If no value is provided, the size will be 1 for all the chunks.

  • 返回:<ReadableStream>

    ¥Returns: <ReadableStream>