Nourishing Plushie Monster

    array-avg

    0.1.0 • Public • Published

    array-avg NPM version Build Status

    Calculate the average of an array of numbers.

    Install with npm

    $ npm i array-avg --save

    Usage

    var avg = require('array-avg');
     
    avg([1, 2, 3, 4, 5]);
    //=> 3
     
    avg(['1', '2', 3, '4', 5]);
    //=> 3
     
    avg([1, 'foo', 2, 4, {}, 5]);
    //=> 2

    Related projects

    array-sum: Add up all of the numbers in an array of numbers. Works when non-numbers are… more | homepage

    Running tests

    Install dev dependencies:

    $ npm i -d && npm test

    Contributing

    Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

    Author

    Brian Woodward

    License

    Copyright © 2015 Brian Woodward Released under the MIT license.


    This file was generated by verb-cli on September 23, 2015.

    Keywords

    none

    Install

    npm i array-avg

    DownloadsWeekly Downloads

    16

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • doowb