reduce module

Type aliases

Functions

Type aliases

Reduce

Ƭ Reduce: function

Defined in index.ts:18

Reduce function (reduces stream to single value)

Type declaration:

▸ (iterable: Iterable‹T›): T

Parameters:

Name Type Description
iterable Iterable‹T› input stream

ReducerFunction

Ƭ ReducerFunction: function

Defined in index.ts:6

Reducer function to accumulate value

Type declaration:

▸ (reduced: T, item: T, index: number): T

Parameters:

Name Type Description
reduced T accumulator
item T item to accumulate
index number item index in stream

Functions

reduce

reduceT›(reducer: ReducerFunction‹T›): Reduce‹T›

Defined in index.ts:32

Function to execute a reducer function on each element of the stream, resulting in a single output value

Type parameters:

T

Parameters:

Name Type Description
reducer ReducerFunction‹T› function to reduce stream to a single value

Returns: Reduce‹T›

reduce function

reduceT›(reducer: ReducerFunction‹T›, iterable: Iterable‹T›): T

Defined in index.ts:41

Function to execute a reducer function on each element of the stream, resulting in a single output value

Type parameters:

T

Parameters:

Name Type Description
reducer ReducerFunction‹T› function to reduce stream to a single value
iterable Iterable‹T› input stream

Returns: T

accumulation result

results matching ""

    No results matching ""