Checks if a value is of type boolean.
value
boolean
const result = isBoolean(true);console.log(result); // true
const result = isBoolean(false);console.log(result); // true
const result = isBoolean(0);console.log(result); // false
true if value is boolean, otherwise false
true
false
the value to check
Generated using TypeDoc
Checks if a
valueis of typeboolean.Example
Example
Example
Returns
trueifvalueisboolean, otherwisefalse