UNPKG

ix

Version:

The Interactive Extensions for JavaScript

17 lines (15 loc) 621 B
import { IterableX } from '../../iterable/iterablex.mjs'; import { reduce } from '../../iterable/reduce.mjs'; export function reduceProto(optionsOrAccumulator, seed) { return reduce(this, // eslint-disable-next-line no-nested-ternary typeof optionsOrAccumulator === 'function' ? arguments.length > 1 ? // prettier-ignore { 'callback': optionsOrAccumulator, 'seed': seed } : // prettier-ignore { 'callback': optionsOrAccumulator } : optionsOrAccumulator); } IterableX.prototype.reduce = reduceProto; //# sourceMappingURL=reduce.mjs.map