UNPKG

es-toolkit

Version:

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

12 lines (7 loc) 260 B
'use strict'; Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); const sumBy = require('./sumBy.js'); function meanBy(items, getValue) { return sumBy.sumBy(items, item => getValue(item)) / items.length; } exports.meanBy = meanBy;