Skip to content

isBoolean

Functions to check the type of value if it's primitive or object boolean.

isBoolean function

ts
function isBoolean(value: unknown): boolean

Checks if the passed value is classified as a primitive boolean.

Parameters

  • value: unknown The value to check.

Return boolean

true if value is a boolean, otherwise false.

isBooleanObject function

ts
function isBooleanObject(value: unknown): boolean

Checks if the passed value is classified as a Boolean primitive or object.

Parameters

  • value: unknown The value to check.

Return boolean

true if value is a boolean or Boolean object, otherwise false.

MIT License, Made with ❤️