mean value utility
$ component install component/mean
Return the mean value in array
:
mean([1,5,6,1,2,0])
mean value in array
with callback fn(val, i)
:
var age = mean(users, function(u){ return u.age })
mean value in array
with the given property string
:
var age = mean(users, 'age')
MIT