source:
node_modules/es-toolkit/dist/math/medianBy.mjs@
ba17441
| Last change on this file since ba17441 was a762898, checked in by , 5 months ago | |
|---|---|
|
|
| File size: 172 bytes | |
| Rev | Line | |
|---|---|---|
| [a762898] | 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.
