Function decodeBoolean

  • Parameters

    • value: unknown

      Value with unknown type

    Returns boolean | null

    Attempts to convert the passed value to a valid boolean, returns null in case cast fails

    A function which attempts to safely cast any value to a valid boolean