Function toBoolean

Returns x if x is true or false, otherwise returns undefined.

  • Parameters

    • x: unknown

    Returns undefined | boolean