- Source:
Methods
(static) alt(funcA, funcB) → {any}
This function will compare the results of 2 functions and return the one that has a value that is neither null or undefined.
Parameters:
| Name | Type | Description |
|---|---|---|
funcA |
function | The first function that will be compared. |
funcB |
function | The second function that will be compared. |
- Source:
Returns:
- Type
- any
(static) always(value) → {function}
This takes a value and returns an anonymoyus function that when executed will always return the original value that was initial passed. Equivelant to setting and getting a constant
Parameters:
| Name | Type | Description |
|---|---|---|
value |
any | data/value that is to be wrapped by the functor |
- Source:
Returns:
- When executed will return value passed into the wrapped function
- Type
- function
(static) and(…value) → {boolean}
This takes a number of values that can be of any type. It will check the values themselves or the results of the functions to determine if all conditions match.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
value |
any |
<repeatable> |
number of arguments that can be of any type. |
- Source:
Returns:
- Type
- boolean
(static) asyncAlt(funcA, funcB) → {any}
This function will compare the results of 2 asynchronous functions and return the one that has a value that is neither null or undefined.
Parameters:
| Name | Type | Description |
|---|---|---|
funcA |
function | The first function that will be compared. |
funcB |
function | The second function that will be compared. |
- Source:
Returns:
- Type
- any
(static) asyncCompose(…functionCollection) → {any}
This function takes a collection of async functions, which are executed through a loop where the previous result of one function is passed to the next. The direction of the is bottom up where last function is executed first.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
functionCollection |
function |
<repeatable> |
Is a collection for funcions |
- Source:
Returns:
- Type
- any
(static) clone(…functionCollection) → {any}
This function takes a collection of functions, which are executed through a loop where the previous result of one function is passed to the next. The direction of the is bottom up where last function is executed first.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
functionCollection |
function |
<repeatable> |
Is a collection for funcions |
- Source:
Returns:
- Type
- any
(static) compose(…functionCollection) → {any}
This function takes a collection of functions, which are executed through a loop where the previous result of one function is passed to the next. The direction of the is bottom up where last function is executed first.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
functionCollection |
function |
<repeatable> |
Is a collection for funcions |
- Source:
Returns:
- Type
- any
(static) curry(curry, argumentsopt) → {function}
This function takes a function and returns an a partial function of that function.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
curry |
function | function we want to parital | |
arguments |
Array.<any> |
<optional> |
optional array of arguments that will are passed to the curried function |
- Source:
Returns:
- Type
- function
(static) identity() → {function}
This function returns a function that console.logs the value passed in as an argument
- Source:
Returns:
- Type
- function
(static) join(join, funcA, funcB) → {any}
This function will combines the results of functions funcA and funcB and return final result.
Parameters:
| Name | Type | Description |
|---|---|---|
join |
function | function manipulates the results of funcA & funcB and returns the results. |
funcA |
function | function takes data passed into and returns a result. |
funcB |
function | function takes data passed into and returns a result. |
- Source:
Returns:
- Type
- any
(static) of(…value) → {array}
This takes a value of any type and it will return that same value wrapped in an array
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
value |
any |
<repeatable> |
number of arguments that can be of any type. |
- Source:
Returns:
- Type
- array
(static) or(…value) → {boolean}
This takes a number of values that can be of any type. It will check the values themselves or the results of the functions to determine if any of the conditions art true.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
value |
any |
<repeatable> |
number of arguments that can be of any type. |
- Source:
Returns:
- Type
- boolean
(static) pipe(…functionCollection) → {any}
This function takes a collection of functions, which are executed through a loop where the previous result of one function is passed to the next. The direction of the is top dowm where first function is executed first.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
functionCollection |
function |
<repeatable> |
Is a collection for funcions |
- Source:
Returns:
- Type
- any
(static) seq(…functions) → {function}
This function will loop through the series of functions passed in a arguments. Each function will be executed with the same data passed in as an argument. This function will return the original data that was passed into the series of funtions that were passed in as arguments.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
functions |
function |
<repeatable> |
function manipulates the results of funcA & funcB and returns the results. |
- Source:
Returns:
- Type
- function
(static) tap(report) → {function}
This function returns a function that will use either the passed in report function or console.log to log the current value passed tho the anonymous function it returns
Parameters:
| Name | Type | Description |
|---|---|---|
report |
function | function manipulates the results of funcA & funcB and returns the results. |
- Source:
Returns:
- Type
- function
(static) wrap(value) → {object}
This a functor that accepts a value and returns that value in a monad. Use fmap to manipulate the value and return a new value without mutating the original
Parameters:
| Name | Type | Description |
|---|---|---|
value |
any | data/value that is to be wrapped by the functor |
- Source:
Returns:
- Instance that can be used to accept functions using fmap to manipulate the original value without mutation
- Type
- object