MCPcopy Create free account
hub / github.com/TanStack/ai / streamOf

Function streamOf

packages/ai/tests/stream-processor.test.ts:36–42  ·  view source on GitHub ↗

Create an async iterable from a list of chunks.

(
  ...chunks: Array<StreamChunk>
)

Source from the content-addressed store, hash-verified

34
35/** Create an async iterable from a list of chunks. */
36async function* streamOf(
37 ...chunks: Array<StreamChunk>
38): AsyncIterable<StreamChunk> {
39 for (const c of chunks) {
40 yield c
41 }
42}
43
44/** Shorthand for common event sequences. */
45const ev = {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected