median-average
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

median-average Travis CI Build Status

Get the median of an array of numbers.

NPM Badge

Install

npm install median-average

Usage

const medianAverage = require("median-average");

medianAverage([1, 2, 6]);
//=> 2

medianAverage([1, 2, 6, 8]);
//=> 4

API

medianAverage(array)

array

Type: array<number>

The array to get the median of.

Package Sidebar

Install

npm i median-average

Weekly Downloads

67

Version

1.0.1

License

MIT

Unpacked Size

3.39 kB

Total Files

6

Last publish

Collaborators

  • richienb