MCPcopy Create free account
hub / github.com/EdgeTX/buddy / arrayFromAsync

Function arrayFromAsync

src/shared/tools.ts:19–29  ·  view source on GitHub ↗
(
  iterator: AsyncIterableIterator<T>
)

Source from the content-addressed store, hash-verified

17};
18
19export const arrayFromAsync = async <T>(
20 iterator: AsyncIterableIterator<T>
21): Promise<T[]> => {
22 const data: T[] = [];
23 // eslint-disable-next-line no-restricted-syntax
24 for await (const value of iterator) {
25 data.push(value);
26 }
27
28 return data;
29};
30
31export const findAsync = async <T>(
32 iterator: AsyncIterableIterator<T>,

Callers 1

index.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected