Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ml-array-mean

mljs864.5kMIT1.1.6TypeScript support: included

Get the average value in an array

readme

array-mean

NPM version npm download

Get the average value in an array.

Installation

$ npm install --save ml-array-mean

Usage

import mean from 'ml-array-mean';

const result = mean([1, 5, 3, 2, 4]);
// 3

License

MIT