Actions⚓︎
An Action is an operation that cause to OsC to be materialized. In other words, an Action is what causes triggers data manipulation to achieve the result described through the OsC.
TLDR list of Actions
Action | Brief Description |
---|---|
collectToArray | Collect the data of the input Iterable into an Array |
forEach | Performs the specified action on each element of the input Iterable |
forEachAsync | Performs the specified async action on each element of the inputIterable |
max | Returns the maximum value found in the input Iterable |
min | Returns the minimum value found in the input Iterable |
reduce | Accumulates all the elements of input Iterable into a single result and returns it |
collectToArray⚓︎
Collect the data of the input Iterable
into an Array
.
forEach⚓︎
Performs the specified action on each element of the Iterable<T>
.
forEachAsync⚓︎
Performs the specified async action on each element of the Iterable<T>
.
The forEachAsync
will wait until all the promeses are either resolved or rejected, but it will not wait the action running on the current item to complete before running the action on the next item.
max⚓︎
Returns the maximum value found in the input Iterable
It is possible to specify a custom comparer option:
-
The name or a list of names of the property to use to identify the maximum value of the
Iterable
-
A function like
(a: T, b: T) => number
which accepts two elements of theIterable
and returns a number as follow:- -1 if
a
is lesser thanb
- 0 if
a
is equal tob
- 1 if
a
is greather thenb
- -1 if
min⚓︎
Returns the minimum value found in the input Iterable
It is possible to specify a custom comparer option:
-
The name or a list of names of the property to use to identify the maximum value of the
Iterable
-
A function like
(a: T, b: T) => number
which accepts two elements of theIterable
and returns a number as follow:- -1 if
a
is lesser thanb
- 0 if
a
is equal tob
- 1 if
a
is greather thenb
- -1 if
reduce⚓︎
Created: March 22, 2023