@lou.codes/predicates
Version:
🧐 Predicate util functions
15 lines (14 loc) • 341 B
JavaScript
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");