MCPcopy Create free account
hub / github.com/ProtonDriveApps/sdk / createAsyncGenerator

Function createAsyncGenerator

client/js/src/internal/asyncIteratorMap.test.ts:5–9  ·  view source on GitHub ↗
(items: T[])

Source from the content-addressed store, hash-verified

3
4// Helper function to create an async generator from array
5async function* createAsyncGenerator<T>(items: T[]): AsyncGenerator<T> {
6 for (const item of items) {
7 yield item;
8 }
9}
10
11// Helper function to collect all results from async generator
12async function collectResults<T>(asyncGen: AsyncGenerator<T>): Promise<T[]> {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected