流与异步生成器和异步迭代器的兼容性


在 JavaScript 中异步生成器和迭代器的支持下,异步生成器在这一点上实际上是一流的语言级流构造。

下面提供了一些将 Node.js 流与异步生成器和异步迭代器一起使用的常见互操作案例。

With the support of async generators and iterators in JavaScript, async generators are effectively a first-class language-level stream construct at this point.

Some common interop cases of using Node.js streams with async generators and async iterators are provided below.