Math them all.

This commit is contained in:
Michał Lipiński
2017-04-04 22:38:50 +02:00
parent bbd59f800b
commit 2538a56577
11 changed files with 14 additions and 52 deletions

View File

@@ -3,9 +3,6 @@ import arrayMap from './.internal/arrayMap.js'
import baseProperty from './.internal/baseProperty.js'
import isArrayLikeObject from './isArrayLikeObject.js'
/* Built-in method references for those with the same name as other `lodash` methods. */
const nativeMax = Math.max
/**
* This method is like `zip` except that it accepts an array of grouped
* elements and creates an array regrouping the elements to their pre-zip
@@ -31,7 +28,7 @@ function unzip(array) {
let length = 0
array = arrayFilter(array, (group) => {
if (isArrayLikeObject(group)) {
length = nativeMax(group.length, length)
length = Math.max(group.length, length)
return true
}
})