MCPcopy
hub / github.com/langchain-ai/langchainjs / isAsyncGenerator

Function isAsyncGenerator

libs/langchain-core/src/runnables/iter.ts:34–40  ·  view source on GitHub ↗
(x: unknown)

Source from the content-addressed store, hash-verified

32}
33
34export function isAsyncGenerator(x: unknown): x is AsyncGenerator {
35 return (
36 x != null &&
37 typeof x === "object" &&
38 typeof (x as AsyncGenerator).next === "function"
39 );
40}
41
42export async function consumeAsyncGenerator<T, TReturn>(
43 generator: AsyncGenerator<T, TReturn>,

Callers 2

callFunction · 0.85
toolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected