Code coverage report for src/forEach.js

Statements: 100% (20 / 20)      Branches: 100% (10 / 10)      Functions: 100% (1 / 1)      Lines: 100% (8 / 8)      Ignored: 4 statements, 2 branches     

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