UNPKG

es-toolkit

Version:

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

13 lines (10 loc) 350 B
import { identity } from '../../function/identity.mjs'; import { meanBy as meanBy$1 } from '../../math/meanBy.mjs'; import { iteratee } from '../util/iteratee.mjs'; function meanBy(items, iteratee$1) { if (items == null) { return NaN; } return meanBy$1(Array.from(items), iteratee(iteratee$1 ?? identity)); } export { meanBy };