$$boolean
Evaluates input to boolean using the Truthy logic
Strings evaluation depends on style
argument:
- By default, value must be
"true"
fortrue
. - Unless
style
is set toJS
, then any non-empty value istrue
. Arrays and objects of size 0 returnsfalse
.
Usage​
{
"$$boolean": /* value */,
"style": "JAVA"
}
"$$boolean([style]):{input}"
Returns​
boolean
Arguments​
Argument | Type | Values | Required / Default Value | Description |
---|---|---|---|---|
style | Enum | JAVA /JS | JAVA | Style of considering truthy values (JS only relates to string handling; not objects and arrays) |
Examples​
Input
Definition
Output
5
"$$boolean:$"
true
"true"
"$$boolean:$"
true
"yes"
"$$boolean:$"
false
"yes"
"$$boolean(JS):$"
true