Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    mean-componentpublic

    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):

    var age = mean(users, function(u){ return u.age })

    mean(array, string)

    mean value in array with the given property string:

    var age = mean(users, 'age')

    License

    MIT

    Keywords

    none

    install

    npm i mean-component

    Downloadsweekly downloads

    3

    version

    1.0.0

    license

    none

    last publish

    collaborators

    • avatar