boolean

View Source

Summary

Coerce input into a boolean.

Accepts:

  • boolean values as-is
  • strings "true" and "false" (case-insensitive, trimmed)

Signature

function boolean(): Schema<unknown, boolean>;

Returns

A schema that produces a boolean