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

Function messageSource

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

Source from the content-addressed store, hash-verified

194
195 // Create a generator that yields JsonMessage objects
196 function* messageSource() {
197 yield new JsonMessage({ type: 'hello', value: 1 });
198 yield '\n';
199 yield new JsonMessage({ type: 'world', value: 2 });
200 }
201
202 const text = await Stream.text(Stream.from(messageSource()));
203 console.log('ToStreamable output:', text);

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected