MCPcopy Create free account
hub / github.com/WinterTC55/iter-streams / asyncChunks

Function asyncChunks

samples/01-basic-creation.ts:91–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

89 // Async generator - great for I/O operations
90 {
91 async function* asyncChunks() {
92 await new Promise(resolve => setTimeout(resolve, 10));
93 yield 'async chunk 1\n';
94 await new Promise(resolve => setTimeout(resolve, 10));
95 yield 'async chunk 2\n';
96 await new Promise(resolve => setTimeout(resolve, 10));
97 yield 'async chunk 3\n';
98 }
99 const text = await Stream.text(Stream.pull(asyncChunks()));
100 console.log('Async generator output:', text.trim());
101 }

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected