MCPcopy Index your code
hub / github.com/stemkoski/stemkoski.github.com / zip

Function zip

MathBox/mathbox-bundle.js:40196–40206  ·  view source on GitHub ↗

* Creates an array of grouped elements, the first of which contains the first * elements of the given arrays, the second of which contains the second * elements of the given arrays, and so on. * * @static * @memberOf _ * @alias unzip * @category Arrays * @para

()

Source from the content-addressed store, hash-verified

40194 * // => [['fred', 30, true], ['barney', 40, false]]
40195 */
40196 function zip() {
40197 var array = arguments.length > 1 ? arguments : arguments[0],
40198 index = -1,
40199 length = array ? max(pluck(array, 'length')) : 0,
40200 result = Array(length < 0 ? 0 : length);
40201
40202 while (++index < length) {
40203 result[index] = pluck(array, index);
40204 }
40205 return result;
40206 }
40207
40208 /**
40209 * Creates an object composed from arrays of `keys` and `values`. Provide

Callers

nothing calls this directly

Calls 1

maxFunction · 0.85

Tested by

no test coverage detected