WordPress at a glance
function is not described

rest_is_boolean() WP 4.7.0

Determines if a given value is boolean-like.

No Hooks.

Return

true/false. True if a boolean, otherwise false.

Usage

rest_is_boolean( $maybe_bool );
$maybe_bool(true/false/string) (required)
The value being evaluated.

Code of rest is boolean: wp-includes/rest-api.php VER 5.1.1

<?php
function rest_is_boolean( $maybe_bool ) {
	if ( is_bool( $maybe_bool ) ) {
		return true;
	}

	if ( is_string( $maybe_bool ) ) {
		$maybe_bool = strtolower( $maybe_bool );

		$valid_boolean_values = array(
			'false',
			'true',
			'0',
			'1',
		);

		return in_array( $maybe_bool, $valid_boolean_values, true );
	}

	if ( is_int( $maybe_bool ) ) {
		return in_array( $maybe_bool, array( 0, 1 ), true );
	}

	return false;
}