mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
Simplify _.zip for the underscore build.
Former-commit-id: 18560e78f052fad5c5d7af1ef6571dd31accf690
This commit is contained in:
7
dist/lodash.underscore.js
vendored
7
dist/lodash.underscore.js
vendored
@@ -3214,13 +3214,12 @@
|
||||
* // => [['moe', 30, true], ['larry', 40, false]]
|
||||
*/
|
||||
function zip() {
|
||||
var array = arguments.length > 1 ? arguments : arguments[0],
|
||||
index = -1,
|
||||
length = array ? max(pluck(array, 'length')) : 0,
|
||||
var index = -1,
|
||||
length = max(pluck(arguments, 'length')),
|
||||
result = Array(length < 0 ? 0 : length);
|
||||
|
||||
while (++index < length) {
|
||||
result[index] = pluck(array, index);
|
||||
result[index] = pluck(arguments, index);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user