Continue to use more ES2015.

This commit is contained in:
John-David Dalton
2017-01-03 23:07:06 -08:00
parent 1a1e462f80
commit 0e24641cb8
7 changed files with 21 additions and 21 deletions

View File

@@ -1,4 +1,3 @@
import baseRest from './_baseRest.js';
import unzipWith from './unzipWith.js';
/**
@@ -21,12 +20,12 @@ import unzipWith from './unzipWith.js';
* });
* // => [111, 222]
*/
var zipWith = baseRest(function(arrays) {
var length = arrays.length,
iteratee = length > 1 ? arrays[length - 1] : undefined;
function zipWith(...arrays) {
const length = arrays.length;
let iteratee = length > 1 ? arrays[length - 1] : undefined;
iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
return unzipWith(arrays, iteratee);
});
}
export default zipWith;