1 var baseRest = require('./_baseRest'),
2 unzipWith = require('./unzipWith');
5 * This method is like `_.zip` except that it accepts `iteratee` to specify
6 * how grouped values should be combined. The iteratee is invoked with the
7 * elements of each group: (...group).
13 * @param {...Array} [arrays] The arrays to process.
14 * @param {Function} [iteratee=_.identity] The function to combine
16 * @returns {Array} Returns the new array of grouped elements.
19 * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
24 var zipWith = baseRest(function(arrays) {
25 var length = arrays.length,
26 iteratee = length > 1 ? arrays[length - 1] : undefined;
28 iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
29 return unzipWith(arrays, iteratee);
32 module.exports = zipWith;