import { asyncIterable } from '../utils/asyncIterable' ; import { filter } from './filter' ; export function skip < TElement > ( source , count ) { if ( count < 0 ) { throw Error ( 'Negative count is not supported, use await and sync iterator instead.' ) ; } return asyncIterable ( async function * ( ) { yield * filter ( source , ( _ , index ) => index >= count ) ; } ) ; }