Conditional
Returns the results of one function or the other based on the result of a condition (boolean function).
Parameters
Section titled “Parameters”| Condition | A Function that returns a boolean |
| If True | A Function whose result is returned if the Condition evaluates to true. Must be the same type as If False |
| If False | A Function whose result is returned if the Condition evaluates to false. Must be the same type as If True |
Return Type
Section titled “Return Type”Returns the contents of If True/If False.
Example
Section titled “Example”Conditional: {Condition: {Connection Check: {contents: ||mdwww1.example.com:80||}}If True: {"[2001:db8::cafe]"}If False: {"[2001:db8::dead, 2001:db8::beef]"}Condition->If True: Returned if the connection check succeedsCondition->If False: Returned if the connection check false}