Convert variable to type boolean

type:to_boolean($variable)

type:to_boolean(1)
#=> TRUE

type:to_boolean('1')
#=> TRUE

type:to_boolean([])
#=> FALSE

type:to_boolean('hello')
#=> TRUE

type:to_boolean('1.0')
#=> TRUE

type:to_boolean('-1.0')
#=> TRUE

type:to_boolean(FALSE)
#=> FALSE

Copyright ©2013-2022 SunSed®. All rights reserved.