| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 6 6 6 31 31 22 31 | function *dropWhile(xs, iteratee, thisArg) {
let drop = true;
let fn = thisArg ? iteratee.bind(thisArg) : iteratee;
let i = 0;
for (let x of xs) {
if (drop) {
drop = fn(x, i, xs);
}
if (!drop) {
yield x;
}
i += 1;
}
}
export default dropWhile;
|