for an explicitly falsy value (0, "", null, undefined, false).">
Skip to content

boolFalsy ​

Builds an Left<"bool"> for an explicitly falsy value (0, "", null, undefined, false).

Interactive example ​

Syntax ​

typescript
function boolFalsy<
	const GenericInput extends BoolFalsyValue = undefined
>(
  input?: GenericInput
): BoolFalsy<GenericInput>;

Parameters ​

  • input: Falsy value (optional).

Return value ​

An Left<"bool", GenericInput> allowing you to represent an explicit false.

See also ​

  • bool – Automatic truthy/falsy conversion.
  • whenIsBoolFalsy – To trigger an action on falsy values.

Released under the MIT license.