Skip to content

assert.Function.isBoolean

soetas edited this page Nov 30, 2024 · 2 revisions

estdlib v0.1.2 / assert / isBoolean

Function: isBoolean()

isBoolean(value): boolean

Checks if value is classified as a boolean primitive or object

Parameters

value: unknown

The value to check

Returns

boolean

  • Returns true if value is a boolean, else false

Since

0.1.2

See

source

Example

isBoolean(false)
// => true

isBoolean(null)
// => false
Clone this wiki locally