📜  fs stream createstream - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:02.010000             🧑  作者: Mango

代码示例2
const { Readable } = require('stream');

async function * generate() {
  yield 'hello';
  yield 'streams';
}

const readable = Readable.from(generate());

readable.on('data', (chunk) => {
  console.log(chunk);
});