Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ml-array-median

Package Overview
Dependencies
Maintainers
5
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ml-array-median

Get the median value in an array

  • 1.1.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created
Source

array-median

NPM version npm download

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.

Installation

$ npm install --save ml-array-median

Usage

import median from 'ml-array-median';

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

License

MIT

FAQs

Package last updated on 30 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc