toBoolean
Converts a value to a boolean.
Thin wrapper over Boolean(value) — kept as a stable surface against
future global-constructor changes.
Usage
toBoolean(value: unknown)
Converts a value to a boolean.
Thin wrapper over Boolean(value) — kept as a stable surface against
future global-constructor changes.
Parameters
valueunknownrequired
the value to convert.
Returns
the input value converted using JavaScript boolean coercion.