Skip to Content
GuardisBoolean

isBoolean

Checks whether the given value is boolean or not

Import

import { isBoolean } from '@fullstacksjs/toolbox';

Signature

function isBoolean(x: unknown): x is boolean {};

Examples

isBoolean(true) // true isBoolean(false) // true isBoolean('') // false isBoolean(undefined) // false isBoolean(null) // false isBoolean(1) // false isBoolean(['1']) // false
Last updated on