source: frontend/node_modules/underscore/amd/unzip.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 464 bytes
Line 
1define(['./max', './_getLength', './pluck'], function (max, _getLength, pluck) {
2
3 // Complement of zip. Unzip accepts an array of arrays and groups
4 // each array's elements on shared indices.
5 function unzip(array) {
6 var length = (array && max(array, _getLength).length) || 0;
7 var result = Array(length);
8
9 for (var index = 0; index < length; index++) {
10 result[index] = pluck(array, index);
11 }
12 return result;
13 }
14
15 return unzip;
16
17});
Note: See TracBrowser for help on using the repository browser.