Code coverage report for src/tap.js

Statements: 100% (36 / 36)      Branches: 100% (17 / 17)      Functions: 100% (2 / 2)      Lines: 100% (6 / 6)      Ignored: 6 statements, 4 branches     

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