mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-29 18:37:58 +03:00
12 lines
189 B
TypeScript
12 lines
189 B
TypeScript
/**
|
|
* Async Generator To Array
|
|
*/
|
|
export async function agta(ag: AsyncIterable<unknown> | Iterable<unknown>) {
|
|
const a = [];
|
|
for await (const el of ag) {
|
|
a.push(el);
|
|
}
|
|
|
|
return a;
|
|
}
|