UNPKG

es-toolkit

Version:

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

17 lines (12 loc) 460 B
'use strict'; Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); const identity = require('../../function/identity.js'); const meanBy$1 = require('../../math/meanBy.js'); const iteratee = require('../util/iteratee.js'); function meanBy(items, iteratee$1) { if (items == null) { return NaN; } return meanBy$1.meanBy(Array.from(items), iteratee.iteratee(iteratee$1 ?? identity.identity)); } exports.meanBy = meanBy;