Returns true when a value can be converted to Boolean
isBoolean(value)
returns boolean
Name | Type | Required | Default | Description |
---|---|---|---|---|
value | any | Yes |
Yes
is considered a boolean that is true
isBoolean("yes")
No
is considered a boolean that is false
isBoolean("no")
Maybe
is not considered a boolean
isBoolean("maybe")
true
is a boolean
isBoolean(true)
false
is a boolean
isBoolean(false)
0
is considered a boolean that is false
isBoolean(0)
23
is considered a boolean that is true
isBoolean(23)