Checks if a given value is of boolean type and has a value of true or false.
true
false
isBool(true)// => trueisBool('hello')// => false Copy
isBool(true)// => trueisBool('hello')// => false
The expected type of the boolean value.
The value to be checked.
true if the given value is of boolean type and has a value of true or false, false otherwise.
Generated using TypeDoc v0.24.7
Checks if a given value is of boolean type and has a value of
true
orfalse
.Example