Code coverage report for array/zip.js

Statements: 100% (8 / 8)      Branches: 50% (1 / 2)      Functions: 100% (3 / 3)      Lines: 100% (7 / 7)     

All files » array/ » zip.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 201           1 3     3 9   3     1      
define(['./max', './pluck'], function (max, pluck) {
 
    /**
     * Merges together the values of each of the arrays with the values at the
     * corresponding position.
     */
    function zip(arr){
        var len = arr? max(pluck(arguments, 'length')) : 0,
            result = new Array(len),
            i = -1;
        while (++i < len){
            result[i] = pluck(arguments, i);
        }
        return result;
    }
 
    return zip;
 
});