Code coverage report for src/zip.js

Statements: 100% (51 / 51)      Branches: 100% (23 / 23)      Functions: 100% (3 / 3)      Lines: 100% (8 / 8)      Ignored: 6 statements, 5 branches     

All files » src/ » zip.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23            26 8 8   26 26   85 85                
import max from './max';
import map from './map';
import nth from './nth';
import size from './size';
 
 
function *zip(...args) {
    let maxSize = max(map(args, size));
    let result;
 
    for (let i = 0; i < maxSize; i++) {
        result = [];
 
        for (let xs of args) {
            result.push(nth(xs, i));
        }
 
        yield result;
    }
}
 
export default zip;