isBoolean
Validates if the supplied input is a boolean.
Signature
isBoolean(input: any): boolean
Parameters
Name | Type | Optional | Description |
---|---|---|---|
input | any | No | Input to validate. |
Return value
Returns true
if the input is a boolean.
Example
import { isBoolean } from "@tripetto/builder";
isBoolean(false); // Returns `true`
isBoolean(1); // Returns `false`