package
Get the median value in an array
npm install ml-array-medianGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Get the median value in an array, this median use the Floyd-Rivest algorithm.
Thanks to mad-gooze for his median-quickselect lib.
Some benchmarks here.
$ npm install --save ml-array-median
import median from 'ml-array-median';
const result = median([1, 5, 3, 2, 4]);
// 3targos
npm@secmail.targos.dev
Estimated unpacked size across 3 packages.
11.0 kB
Includes dependencies.