dist/iterable/operators.js
/** Take everything but the last N items in an iterable sequence */
Take everything but the last N items in an iterable sequence
Take everything but the last N items in an iterable sequence
function skipLast(count) {
    return function* (iterable) {
        const buffer = [];
        for (const item of iterable) {
            buffer.push(item);
        }
        if (buffer.length < count) {
            return;
        }
        yield* buffer.slice(0, buffer.length - count);
    };
}
function skipLast ( count ) { return function * ( iterable ) { const buffer = [ ] ; for ( const item of iterable ) { buffer . push ( item ) ; } if ( buffer . length < count ) { return ; } yield * buffer . slice ( 0 , buffer . length - count ) ; } ; }
Take everything but the last N items in an iterable sequence
Take everything but the last N items in an iterable sequence