dist/async-iterable/operators.js
/** Play the given AsyncIterable, and then it N more times */
Play the given AsyncIterable, and then it N more times
Play the given AsyncIterable and then it N more times
function repeat(times) {
    return function (it) {
        return __asyncGenerator(this, arguments, function* () {
            var e_26, _a;
            const buffer = [];
            try {
                for (var it_6 = __asyncValues(it), it_6_1; it_6_1 = yield __await(it_6.next()), !it_6_1.done;) {
                    const item = it_6_1.value;
                    buffer.push(item);
                    yield yield __await(item);
                }
            }
            catch (e_26_1) { e_26 = { error: e_26_1 }; }
            finally {
                try {
                    if (it_6_1 && !it_6_1.done && (_a = it_6.return)) yield __await(_a.call(it_6));
                }
                finally { if (e_26) throw e_26.error; }
            }
            for (let i = 0; i < times; ++i) {
                yield __await(yield* __asyncDelegator(__asyncValues(buffer)));
            }
        });
    };
}
function repeat ( times ) { return function ( it ) { return __asyncGenerator ( this , arguments , function * ( ) { var e_26 , _a ; const buffer = [ ] ; try { for ( var it_6 = __asyncValues ( it ) , it_6_1 ; it_6_1 = yield __await ( it_6 . next ( ) ) , ! it_6_1 . done ; ) { const item = it_6_1 . value ; buffer . push ( item ) ; yield yield __await ( item ) ; } } catch ( e_26_1 ) { e_26 = { error : e_26_1 } ; } finally { try { if ( it_6_1 && ! it_6_1 . done && ( _a = it_6 . return ) ) yield __await ( _a . call ( it_6 ) ) ; } finally { if ( e_26 ) throw e_26 . error ; } } for ( let i = 0 ; i < times ; ++ i ) { yield __await ( yield * __asyncDelegator ( __asyncValues ( buffer ) ) ) ; } } ) ; } ; }
Play the given AsyncIterable, and then it N more times
Play the given AsyncIterable and then it N more times