Code coverage report for src/filter.js

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

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