MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / unzip

Function unzip

lib/web/jshint.js:7227–7236  ·  view source on GitHub ↗

* This method is like `_.zip` except that it accepts an array of grouped * elements and creates an array regrouping the elements to their pre-`_.zip` * configuration. * * @static * @memberOf _ * @category Array * @param {Array} array The array of grouped elements t

(array)

Source from the content-addressed store, hash-verified

7225 * // => [['fred', 'barney'], [30, 40], [true, false]]
7226 */
7227 function unzip(array) {
7228 var index = -1,
7229 length = (array && array.length && arrayMax(arrayMap(array, getLength))) >>> 0,
7230 result = Array(length);
7231
7232 while (++index < length) {
7233 result[index] = arrayMap(array, baseProperty(index));
7234 }
7235 return result;
7236 }
7237
7238 /**
7239 * Creates an array excluding all provided values using `SameValueZero` for

Callers

nothing calls this directly

Calls 3

arrayMaxFunction · 0.85
arrayMapFunction · 0.85
basePropertyFunction · 0.85

Tested by

no test coverage detected