async-iterable-iterator/async-iterable-to-array

View on GitHub
src/index.js

Summary

Maintainability
A
0 mins
Test Coverage
import {asyncIteratorToArray} from '@async-iterable-iterator/async-iterator-to-array';

export const asyncIterableToArray = async (asyncIterable) => {
    const asyncIterator = asyncIterable[Symbol.asyncIterator]();
    return asyncIteratorToArray(asyncIterator);
};