Skip to main content

isBoolean

Validates if the supplied input is a boolean.

Signature

isBoolean(input: any): boolean

Parameters

NameTypeOptionalDescription
inputanyNoInput to validate.

Return value

Returns true if the input is a boolean.

Example

import { isBoolean } from "@tripetto/runner";

isBoolean(false); // Returns `true`
isBoolean(1); // Returns `false`