Code coverage report for src/dropWhile.js

Statements: 100% (47 / 47)      Branches: 100% (26 / 26)      Functions: 100% (2 / 2)      Lines: 100% (8 / 8)      Ignored: 6 statements, 4 branches     

All files » src/ » dropWhile.js
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;