UNPKG

@newdash/newdash

Version:

javascript/typescript utility library

14 lines (13 loc) 524 B
export default arrayReduce; /** * A specialized version of `reduce` for arrays. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. * @param {boolean} [initAccum] Specify using the first element of `array` as * the initial value. * @returns {*} Returns the accumulated value. */ declare function arrayReduce(array?: any[], iteratee: Function, accumulator?: any, initAccum?: boolean): any;