()
| 78 | // Synchronous generator as source |
| 79 | { |
| 80 | function* lines() { |
| 81 | yield 'line 1\n'; |
| 82 | yield 'line 2\n'; |
| 83 | yield 'line 3\n'; |
| 84 | } |
| 85 | const text = await Stream.text(Stream.pull(lines())); |
| 86 | console.log('Sync generator output:', text.trim()); |
| 87 | } |