aureooms/js-tape

View on GitHub
src/toArray.js

Summary

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

import toAsyncIterable from './toAsyncIterable.js';

/**
 * Converts a tape to an array.
 *
 * @function
 * @param {Tape} tape - The tape to read from.
 * @returns {Promise<any[]>} The converted array.
 */
export default (tape) => asyncIterableToArray(toAsyncIterable(tape));