scanWith module

Type aliases

Functions

Type aliases

ReducerFunction

Ƭ ReducerFunction: function

Defined in index.ts:6

Reducer function to accumulate value

Type declaration:

▸ (reduced: D, item: S, index: number): D

Parameters:

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

ScanWith

Ƭ ScanWith: function

Defined in index.ts:18

Scan function (reduces stream and emits intermediate accumulated results)

Type declaration:

▸ (iterable: Iterable‹S›): IterableIterator‹D›

Parameters:

Name Type Description
iterable Iterable‹S› input stream

Functions

scanWith

scanWithS, D›(reducer: ReducerFunction‹S, D›, initial: D): ScanWith‹S, D›

Defined in index.ts:33

Function to execute a reducer function on each element of the stream and emit each intermediate accumulated result

Type parameters:

S

D

Parameters:

Name Type Description
reducer ReducerFunction‹S, D› function to reduce stream to a single value
initial D initial accumulated result

Returns: ScanWith‹S, D›

stream of intermediate accumulated results

scanWithS, D›(reducer: ReducerFunction‹S, D›, initial: D, iterable: Iterable‹S›): IterableIterator‹D›

Defined in index.ts:43

Function to execute a reducer function on each element of the stream and emit each intermediate accumulated result

Type parameters:

S

D

Parameters:

Name Type Description
reducer ReducerFunction‹S, D› function to reduce stream to a single value
initial D initial accumulated result
iterable Iterable‹S› input stream

Returns: IterableIterator‹D›

stream of intermediate accumulated results

results matching ""

    No results matching ""