X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=node_modules%2Fgrunt-uncss%2Fnode_modules%2Flodash%2FzipWith.js;fp=node_modules%2Fgrunt-uncss%2Fnode_modules%2Flodash%2FzipWith.js;h=d7a1f91971e0c62b54f07ee9f7bbce019fe38f59;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/node_modules/grunt-uncss/node_modules/lodash/zipWith.js b/node_modules/grunt-uncss/node_modules/lodash/zipWith.js new file mode 100644 index 000000000..d7a1f9197 --- /dev/null +++ b/node_modules/grunt-uncss/node_modules/lodash/zipWith.js @@ -0,0 +1,32 @@ +var baseRest = require('./_baseRest'), + unzipWith = require('./unzipWith'); + +/** + * 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). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee=_.identity] The function to combine + * grouped values. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { + * return a + b + c; + * }); + * // => [111, 222] + */ +var zipWith = baseRest(function(arrays) { + var length = arrays.length, + iteratee = length > 1 ? arrays[length - 1] : undefined; + + iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; + return unzipWith(arrays, iteratee); +}); + +module.exports = zipWith;