Travis build: 1780

This commit is contained in:
30secondsofcode
2018-03-06 18:59:57 +00:00
parent 883063e278
commit e7c5bcf6c6
3 changed files with 17 additions and 24 deletions

View File

@ -11,11 +11,10 @@ The function is invoked with the elements of each group `(...group)`.
```js
const zipWith = (...array) => {
const fn = typeof array[array.length - 1] === 'function' ? array.pop() : undefined;
return Array
.from(
{ length: Math.max(...array.map(a => a.length)) },
(_, i) => (fn ? fn(...array.map(a => a[i])) : array.map(a => a[i])),
);
return Array.from(
{ length: Math.max(...array.map(a => a.length)) },
(_, i) => (fn ? fn(...array.map(a => a[i])) : array.map(a => a[i]))
);
};
```