just-mean
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

just-mean

Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.

🍦 Try it

npm install just-mean
yarn add just-mean

The mean (average) value in an array

import mean from 'just-mean';

mean([1, 2, 3, 2, 4, 1]); // 2.1666666667
mean(3, 2, 1); // 2
mean([4]); // 4
mean(['3', 2]); // throws
mean(); // throws

Package Sidebar

Install

npm i just-mean

Weekly Downloads

42

Version

2.2.0

License

MIT

Unpacked Size

4.23 kB

Total Files

9

Last publish

Collaborators

  • angus-c