scan module
Type aliases
Functions
Type aliases
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 |
Scan
Ƭ Scan: function
Defined in index.ts:18
Scan function (reduces stream and emits intermediate accumulated results)
Type declaration:
▸ (iterable
: Iterable‹T›): IterableIterator‹T›
Parameters:
Name | Type | Description | |
---|---|---|---|
iterable |
Iterable‹T› | input stream |
Functions
scan
▸ scan‹T›(reducer
: ReducerFunction‹T›): Scan‹T›
Defined in index.ts:32
Function to execute a reducer function on each element of the stream and emit each intermediate accumulated result
Type parameters:
▪ T
Parameters:
Name | Type | Description | |
---|---|---|---|
reducer |
ReducerFunction‹T› | function to reduce stream to a single value |
Returns: Scan‹T›
stream of intermediate accumulated results
▸ scan‹T›(reducer
: ReducerFunction‹T›, iterable
: Iterable‹T›): IterableIterator‹T›
Defined in index.ts:41
Function to execute a reducer function on each element of the stream and emit each intermediate accumulated result
Type parameters:
▪ T
Parameters:
Name | Type | Description | |
---|---|---|---|
reducer |
ReducerFunction‹T› | function to reduce stream to a single value | |
iterable |
Iterable‹T› | input stream |
Returns: IterableIterator‹T›
stream of intermediate accumulated results