cond
Syntax
cond CONTROL VAR1 VAR2
cond
returns VAR1 if CONTROL is true, or VAR2 if it is not.
Example:
{{ cond (eq (len $geese) 1) "goose" "geese" }}
Would emit “goose” if the $geese
array has exactly 1 item, or “geese” otherwise.
cond CONTROL VAR1 VAR2
cond
returns VAR1 if CONTROL is true, or VAR2 if it is not.
Example:
{{ cond (eq (len $geese) 1) "goose" "geese" }}
Would emit “goose” if the $geese
array has exactly 1 item, or “geese” otherwise.