Support Transformers
Support transformers can be used on any data type. Following transformers are available:
isString
isString
Outputs true
or false
on whether the source String
.
Usage:
.isString()
Example usage:
value.isString()
Example return:
"bob"
totrue
isArray
isArray
Outputs true
or false
on whether the source is Array
.
Usage:
.isArray()
Example usage:
value.isArray()
Example return:
["bob", "man"]
totrue
isDictionary
isDictionary
Outputs true
or false
on whether the source is Dictionary
.
Usage:
.isDictionary()
Example usage:
value.isDictionary()
Example return:
["age": 21]
totrue
isNumber
isNumber
Outputs true
or false
on whether the source is Number
.
Usage:
.isNumber()
Example usage:
value.isNumber()
Example return:
69420
totrue
isBool
isBool
Outputs true
or false
on whether the source is Bool
.
Usage:
.isBool()
Example usage:
value.isBool()
Example return:
false
totrue
isNull
isNull
Outputs true
or false
on whether the source is null
.
Usage:
.isNull()
Example usage:
value.isNull()
Example return:
false
totrue
toString
toString
Describes values that otherwise throw an error when used in substitutions. For example, a dictionary can't be printed by {{ dict }}
, however, it can be printed using {{ dict.toString() }}
. This method fully describes Dictionary
, Array
, String
, Number
or Bool
.
Usage:
.toString()
Example usage:
value.toString()
Example return:
["age": 21]
to"["age": 21]"
equals
equals
Returns boolean based on whether value equals another value. Both values must be of the same type, otherwise equals
always returns true.
Usage:
.equals(value)
Example usage:
"Tom".equals("Tom")
Example return:
true
Last updated
Was this helpful?