aureooms/js-tape

View on GitHub
src/toAsyncIterator.js

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import toAsyncIterable from './toAsyncIterable.js';

/**
 * Converts a tape to an async iterator.
 *
 * @function
 * @param {Tape} tape - The tape to read from.
 * @returns {AsyncIterator} The converted iterator.
 */
export default (tape) => toAsyncIterable(tape)[Symbol.asyncIterator]();