Array.fromAsync
Modules
Built-ins signatures
class Array {
static fromAsync(asyncItems: AsyncIterable | Iterable | ArrayLike, mapFn?: (value: any, index: number) => any, thisArg?: any): Promise<Array<mixed>>;
}
Entry points
core-js/proposals/array-from-async-stage-2
core-js(-pure)/es|stable|actual|full/array/from-async
Examples
await Array.fromAsync(
(async function * () { yield * [1, 2, 3]; })(),
i => i ** 2
); // => [1, 4, 9]