isBoolean
isBoolean(
x):x is boolean
Checks if x is a boolean primitive.
Example
isBoolean(true)// => true
isBoolean("foobar")// => falseAlternatives
Parameters
x
unknown
The value to check.
Returns
x is boolean
true if x is a boolean, false otherwise.