Generic methods
The following methods are common to all CSML primitive types.
.type_of()
Return the type of the target value (string
, array
, object
, float
, boolean
, int
, null
)
.to_string()
Return the target value formatted as a string.
.is_number()
Check if a variable can be interpreted as a number (float or int)
.is_int()
Check if the variable can be interpreted as an int
.is_float()
Check if the variable can be interpreted as an float
.is_error(), .get_info()
Some functions may resolve to an error due to a faulty user input, an unreachable API, or some other bug in the code. You can check the result of such functions call (like HTTP()
or App())
with .is_error()
, and get more information with .get_info()
.
Last updated