MCPcopy
hub / github.com/continuedev/continue / genToArr

Function genToArr

core/indexing/chunk/code.test.ts:5–11  ·  view source on GitHub ↗
(generator: AsyncGenerator<T>)

Source from the content-addressed store, hash-verified

3import { codeChunker } from "./code";
4
5async function genToArr<T>(generator: AsyncGenerator<T>): Promise<T[]> {
6 const result: T[] = [];
7 for await (const item of generator) {
8 result.push(item);
9 }
10 return result;
11}
12
13async function genToStrs(
14 generator: AsyncGenerator<ChunkWithoutID>,

Callers 1

genToStrsFunction · 0.85

Calls 1

pushMethod · 0.65

Tested by

no test coverage detected