source:
node_modules/es-toolkit/dist/math/medianBy.mjs
| Last change on this file was a762898, checked in by , 5 months ago | |
|---|---|
|
|
| File size: 172 bytes | |
| Line | |
|---|---|
| 1 | import { median } from './median.mjs'; |
| 2 | |
| 3 | function medianBy(items, getValue) { |
| 4 | const nums = items.map(x => getValue(x)); |
| 5 | return median(nums); |
| 6 | } |
| 7 | |
| 8 | export { medianBy }; |
Note:
See TracBrowser
for help on using the repository browser.
