rittenhop-dev/versions/5.94.2/node_modules/lodash-es/mean.js

23 lines
420 B
JavaScript
Raw Normal View History

2024-09-23 19:40:12 -04:00
import baseMean from './_baseMean.js';
import identity from './identity.js';
/**
* Computes the mean of the values in `array`.
*
* @static
* @memberOf _
* @since 4.0.0
* @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 baseMean(array, identity);
}
export default mean;