X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=node_modules%2Fgrunt-legacy-util%2Fnode_modules%2Flodash%2Fmean.js;fp=node_modules%2Fgrunt-legacy-util%2Fnode_modules%2Flodash%2Fmean.js;h=739dc4147f136e2f109410634a30413800921adf;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/node_modules/grunt-legacy-util/node_modules/lodash/mean.js b/node_modules/grunt-legacy-util/node_modules/lodash/mean.js new file mode 100644 index 000000000..739dc4147 --- /dev/null +++ b/node_modules/grunt-legacy-util/node_modules/lodash/mean.js @@ -0,0 +1,20 @@ +var sum = require('./sum'); + +/** + * Computes the mean of the values in `array`. + * + * @static + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {number} Returns the mean. + * @example + * + * _.mean([4, 2, 8, 6]); + * // => 5 + */ +function mean(array) { + return sum(array) / (array ? array.length : 0); +} + +module.exports = mean;