mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-13 12:27:49 +00:00
Math them all.
This commit is contained in:
5
unzip.js
5
unzip.js
@@ -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
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user