使用异步迭代器使用可读流


¥Consuming readable streams with async iterators

(async function() {
  for await (const chunk of readable) {
    console.log(chunk);
  }
})(); 

异步迭代器在流上注册一个永久错误处理程序,以防止任何未处理的销毁后错误。

¥Async iterators register a permanent error handler on the stream to prevent any unhandled post-destroy errors.