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

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

Fix frontend appearance

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