MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / toArray

Function toArray

source code/utils/generators.ts:76–84  ·  view source on GitHub ↗
(
  generator: AsyncGenerator<A, void>,
)

Source from the content-addressed store, hash-verified

74}
75
76export async function toArray<A>(
77 generator: AsyncGenerator<A, void>,
78): Promise<A[]> {
79 const result: A[] = []
80 for await (const a of generator) {
81 result.push(a)
82 }
83 return result
84}
85
86export async function* fromArray<T>(values: T[]): AsyncGenerator<T, void> {
87 for (const value of values) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected