WordPress at a glance
function is not described

rest_sanitize_boolean() WP 4.7.0

Changes a boolean-like value into the proper boolean value.

No Hooks.

Return

true/false. Returns the proper associated boolean value.

Usage

rest_sanitize_boolean( $value );
$value(true/false/string/int) (required)
The value being evaluated.

Changelog

Since 4.7.0 Introduced.

Code of rest sanitize boolean: wp-includes/rest-api.php WP 5.2.2

<?php
function rest_sanitize_boolean( $value ) {
	// String values are translated to `true`; make sure 'false' is false.
	if ( is_string( $value ) ) {
		$value = strtolower( $value );
		if ( in_array( $value, array( 'false', '0' ), true ) ) {
			$value = false;
		}
	}

	// Everything else will map nicely to boolean.
	return (bool) $value;
}