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