mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +00:00
Fix perf regression of _.zip.
This commit is contained in:
@@ -4415,7 +4415,13 @@
|
|||||||
* // => [['fred', 30, true], ['barney', 40, false]]
|
* // => [['fred', 30, true], ['barney', 40, false]]
|
||||||
*/
|
*/
|
||||||
function zip() {
|
function zip() {
|
||||||
return unzip(arguments);
|
var length = arguments.length,
|
||||||
|
array = Array(length);
|
||||||
|
|
||||||
|
while (length--) {
|
||||||
|
array[length] = arguments[length];
|
||||||
|
}
|
||||||
|
return unzip(array);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user