Global

Methods

isClientError(xhr) → {Boolean}

Check if an HTTP status is a client error status
Parameters:
Name Type Description
xhr * Should support xhr.status
Source:
Returns:
true or false
Type
Boolean

isClientError(xhr) → {Boolean}

Check if an HTTP status is a server error status
Parameters:
Name Type Description
xhr * Should support xhr.status
Source:
Returns:
true or false
Type
Boolean

isError(xhr) → {Boolean}

Check if an HTTP status is an error status. This can be either client or server.
Parameters:
Name Type Description
xhr * Should support xhr.status
Source:
Returns:
true or false
Type
Boolean

isInfo(xhr) → {Boolean}

Check if an HTTP status is an info status
Parameters:
Name Type Description
xhr * Should support xhr.status
Source:
Returns:
true or false
Type
Boolean

isRedirect(xhr) → {Boolean}

Check if an HTTP status is a redirect status
Parameters:
Name Type Description
xhr * Should support xhr.status
Source:
Returns:
true or false
Type
Boolean

isSuccess(xhr) → {Boolean}

Check if an HTTP status is a success status
Parameters:
Name Type Description
xhr * Should support xhr.status
Source:
Returns:
true or false
Type
Boolean

parseBoolean(value) → {boolean}

Normalize an HTML attribute value to a boolean. This function interprets a variety of string-like inputs as either `true` or `false`: - Empty string ("") becomes true (e.g. ) - "false" and "0" become false - All other defined values become true
Parameters:
Name Type Description
value string | null | undefined The attribute value to parse
Source:
Returns:
The normalized boolean result
Type
boolean