Skip to main content

Type

typeof

  • typeof(variable)
    • if variable is primitive value, returns the type of the primitive value:
      • "string", "int64", "float64", "bool", "null", "undefined", "list", "map", "jsonObj", "jsonArray"
    • else return the type of the object:
      • "Tuple", "Map", "Lambda", "Table", "MetricStream", "Alert"
typeof(2) // return the string "int64"
typeof([1, 2, 3]) // return the string "list"

isNull

  • isNull(var)
    • return true if var is a null type, false otherwise
isNull("Hello") // return false
isNull(null) // return true

isUndef

  • isUndef(var)
    • return true if var is a undefined type, false otherwise
isUndef(null) // return false

let s = coalesce("", "", "") // return undefined
isUndef(s) // return true

isString

  • isString(var)
    • return true if var is of string type, false otherwise
isString("abc") // return true
isString(64) // return false

isNumber

  • isNumber(var)
    • return false if var is of int64 or float64 type, false otherwise
isNumber("abc") // return false
isNumber(64) // return true