IsBoolean
Determine whether a given object is a boolean
Method Signature
Arguments
Argument
Type
Required
Description
Default
object
any
true
The value to test for boolean-ness.
Examples
Yes
Yes
is considered a boolean that is true
Result: true
No
No
is considered a boolean that is false
Result: true
Maybe
Maybe
is not considered a boolean
Result: false
True
true
is a boolean
Result: true
False
false
is a boolean
Result: true
Zero
0
is considered a boolean that is false
Result: true
Non Zero Integer
23
is considered a boolean that is true
Result: true
Additional Examples
Related
Last updated
Was this helpful?