Function toBoolean

  • Converts the specified value to a boolean (note that it is case-insensitive).

    Parameters

    • value: undefined | null | string | number | boolean

      Value to convert to a boolean.

    Returns boolean

    Boolean representation of the specified value.