UNPKG

es-toolkit

Version:

A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.

9 lines (6 loc) 172 B
import { median } from './median.mjs'; function medianBy(items, getValue) { const nums = items.map(x => getValue(x)); return median(nums); } export { medianBy };