mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
Use arrayMax and arrayMap instead of _.max and _.pluck in _.unzip.
This commit is contained in:
@@ -5023,11 +5023,11 @@
|
||||
*/
|
||||
function unzip(array) {
|
||||
var index = -1,
|
||||
length = isObject(length = max(array, 'length')) && length.length || 0,
|
||||
length = (array && array.length && arrayMax(arrayMap(array, property('length')))) >>> 0,
|
||||
result = Array(length);
|
||||
|
||||
while (++index < length) {
|
||||
result[index] = pluck(array, index);
|
||||
result[index] = arrayMap(array, property(index));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user