Skip to content

A small JavaScript library for approximation of median value in streaming data

License

Notifications You must be signed in to change notification settings

VMois/remedian-js

Repository files navigation

remedian-js

A small JavaScript library for approximation of median value on a streaming data.

MIT license npm

Features

  • no dependencies: no need to worry about conflicts
  • robust algorithm: library is based on Remedian algorithm

Example

const Remedian = require('remedian');

const remedian = new Remedian();
remedian.write(1);
remedian.write(2);
remedian.write(3);
// ...
remedian.write(99);

console.log('My approximate median is ', remedian.approximate());

Install

npm install remedian

References