@reactivex/ix-esnext-esm
Version:
The Interactive Extensions for JavaScript
15 lines (13 loc) • 543 B
JavaScript
import { IterableX } from '../../iterable/iterablex';
import { reduce } from '../../iterable/reduce';
export function reduceProto(optionsOrAccumulator, seed) {
return reduce(this,
// eslint-disable-next-line no-nested-ternary
typeof optionsOrAccumulator === 'function'
? arguments.length > 1
? { 'callback': optionsOrAccumulator, 'seed': seed }
: { 'callback': optionsOrAccumulator }
: optionsOrAccumulator);
}
IterableX.prototype.reduce = reduceProto;
//# sourceMappingURL=reduce.mjs.map