UNPKG

@reactivex/ix-esnext-esm

Version:

The Interactive Extensions for JavaScript

17 lines (15 loc) 618 B
import { IterableX } from '../../iterable/iterablex.js'; import { reduce } from '../../iterable/reduce.js'; 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.js.map