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

Function source

samples/12-nodejs-interop.ts:422–428  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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()));

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected