Skip to content

isBoolean

Test if a value is a boolean.

Usage

js
import { isBoolean } from '@studiometa/js-toolkit/utils';

isBoolean(true); // true
isBoolean('foo'); // false

Parameters

  • value (any): the value to test

Return value

Returns true if the given value is a boolean, false otherwise.

MIT Licensed