Skip to content

sumBy

sumBy<T>(iterable, valueOf, options?): number

Defined in: sum.ts:24

Returns the sum of fn(item) over all items.

T

Iterable<T>

The input iterable.

Callable<[T], number>

Numeric extractor.

SumOptions

How to accumulate; exact by default.

number

The total sum.