UNPKG

@lou.codes/predicates

Version:
15 lines (14 loc) 341 B
import { isType } from "./isType.js"; /** * `typeof` "boolean" alias. * * @category Primitives * @example * ```typescript * isBoolean(true); // true * isBoolean(false); // true * isBoolean(null); // false * ``` * @returns `true` if the given value is a `boolean`, `false` otherwise. */ export const isBoolean = isType("boolean");