axax
Version:
A library of async iterator extensions for JavaScript including ```map```, ```reduce```, ```filter```, ```flatMap```, ```pipe``` and [more](https://github.com/jamiemccrindle/axax/blob/master/docs/API.md#functions).
17 lines (16 loc) • 386 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Skip the first numberToSkip values
*/
function skip(numberToSkip) {
return async function* inner(source) {
let count = 0;
for await (const item of source) {
if (count++ > numberToSkip) {
yield item;
}
}
};
}
exports.skip = skip;