COLLECTED BY
Organization:
Internet Archive
Focused crawls are collections of frequently-updated webcrawl data from narrow (as opposed to broad or wide) web crawls, often focused on a single domain or subdomain.
The Wayback Machine - https://web.archive.org/web/20201220222841/https://github.com/lodash/lodash/blob/master/zipWith.js
Permalink
Cannot retrieve contributors at this time
27 lines (25 sloc)
897 Bytes
import unzipWith from './unzipWith.js'
/**
* This method is like `zip` except that it accepts `iteratee` to specify
* how grouped values should be combined. The iteratee is invoked with the
* elements of each group: (...group).
*
* @since 3.8.0
* @category Array
* @param {...Array } [arrays] The arrays to process.
* @param {Function } iteratee The function to combine
* grouped values.
* @returns {Array } Returns the new array of grouped elements.
* @see unzip, unzipWith, zip, zipObject, zipObjectDeep, zipWith
* @example
*
* zipWith([1, 2], [10, 20], [100, 200], (a, b, c) => a + b + c)
* // => [111, 222]
*/
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
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.