UNPKG

@ai-sdk/provider-utils

Version:
10 lines (9 loc) 213 B
export async function convertAsyncIterableToArray<T>( iterable: AsyncIterable<T>, ): Promise<T[]> { const result: T[] = []; for await (const item of iterable) { result.push(item); } return result; }