Namespace: util

OpenAjax.a11y.util

Source:
  • scripts/cache_util.js, line 7

Methods

<static> escapeForJSON(str) → {String}

Returns an safe string for JSON output that has single quotes and new line characters

Parameters:
Name Type Description
str String string to escape
Source:
  • scripts/cache_util.js, line 27
Returns:
Escaped string
Type
String

<static> getFormattedDate() → {String}

Returns a fomratted string (YYYY-MM-DD) represeting the current date with leading zeros

Source:
  • scripts/cache_util.js, line 72
Returns:
Formatted date string
Type
String

<static> getStringUsingURL(url)

Reads a URL into a string Used with creating HTML reports

Parameters:
Name Type Description
url String url to file
Source:
  • scripts/cache_util.js, line 104

<static> removeEscapesFromJSON(str) → {String}

Returns an unescaped string from a JSON string that has been escaped for single quotes and new line characters

Parameters:
Name Type Description
str String string to un escape
Source:
  • scripts/cache_util.js, line 50
Returns:
String with escape characters removed
Type
String

<static> RGBToHex(rgb_color)

Converts an RGB color to Hex values

Parameters:
Name Type Description
rgb_color String RGB Color
Source:
  • scripts/cache_util.js, line 230
Returns:
String

<static> transformElementMarkup(str)

Converts element markup in strings to capitalized text (default) or adds element

Parameters:
Name Type Description
str String String to convert element text
Source:
  • scripts/cache_util.js, line 134
Returns:
String

<static> urlExists(url)

Determines if a URL exits

Parameters:
Name Type Description
url String url to test if it exists
Source:
  • scripts/cache_util.js, line 191
Returns:
Number