JSPM

faster-median

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 28742
  • Score
    100M100P100Q153618F
  • License CC0-1.0

🔥 A Quick and Precise Way to get the Median Value of an Array of Numbers (Typed or Untyped)

Package Exports

  • faster-median
  • faster-median/src/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (faster-median) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

faster-median

🔥 A Quick Way to get the Median Value of an Array of Numbers (Typed or Untyped)

install

npm install faster-median

usage

const fasterMedian = require("faster-median");

const nums = [0, 56, 123, 63, 763, ...];
fasterMedian({ nums, no_data: 0 })
128.1231236542

// calculate median with infinite precision using preciso
fasterMedian({ nums, no_data: 0, precise: true })
"128.1231236542451283153614234128736127354564"