()
| 420 | { |
| 421 | // Create a new Stream |
| 422 | async function* source() { |
| 423 | yield 'chunk1\n'; |
| 424 | await new Promise((r) => setTimeout(r, 10)); |
| 425 | yield 'chunk2\n'; |
| 426 | await new Promise((r) => setTimeout(r, 10)); |
| 427 | yield 'chunk3\n'; |
| 428 | } |
| 429 | |
| 430 | // Convert to Node.js Readable |
| 431 | const nodeReadable = toNodeReadable(Stream.from(source())); |