Skip to content

isBoolean ​

Checks whether the provided value is a boolean.

Parameters ​

  • value (unknown): The value to check, which can be of any type.

Returns ​

  • boolean: true if the value is a boolean, otherwise false.

Usage ​

ts
isBoolean(true); // true
isBoolean('hello'); // false