Skip to content

Repository files navigation

mean

mean value utility

Installation

$ component install component/mean

API

mean(array)

Return the mean value in array:

mean([1,5,6,1,2,0])

mean(array, fn)

mean value in array with callback fn(val, i):

varage=mean(users,function(u){returnu.age})

mean(array, string)

mean value in array with the given property string:

varage=mean(users,'age')

License

MIT

About

Array mean utility

Resources

Stars

2 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages