AsyncIterator to Array conversion for JavaScript. See docs.
⚠️ Depending on your environment, the code may requireregeneratorRuntime
to be defined, for instance by importing regenerator-runtime/runtime.
import {asyncIteratorToArray} from '@async-iterable-iterator/async-iterator-to-array';
let asyncIterator = ...;
let array = await asyncIteratorToArray(asyncIterator);