Code coverage report for src/thru.js

Statements: 100% (41 / 41)      Branches: 100% (22 / 22)      Functions: 100% (2 / 2)      Lines: 100% (5 / 5)      Ignored: 6 statements, 4 branches     

All files » src/ » thru.js
1 2 3 4 5 6 7 8 9 10 11 12  3 3   12   12          
function *thru(xs, iteratee, thisArg) {
    let fn = thisArg ? iteratee.bind(thisArg) : iteratee;
    let i = 0;
 
    for (let x of xs) {
        yield fn(x, i, xs);
        i += 1;
    }
}
 
export default thru;