+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+ (static) addLeadingZeroes(value, expectedLengthopt) → {string|null}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.addLeadingZeroes()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The string to add leading zeroes to. |
+
+
+
+
+
+
+ expectedLength |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ NaN
+
+ |
+
+
+ The expected minimum length of the string after zeroes have been prepended to it. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+string
+|
+
+null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) appendSlash(TODO_ARG_NAME) → {TODO_RETURN_TYPE}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.appendSlash()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ TODO_ARG_NAME |
+
+
+
+
+
+TODO_ARG_TYPE
+
+
+
+ |
+
+
+
+
+
+ TODO_ARG_DESC. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+TODO_RETURN_TYPE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) clone(value) → {any}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.clone({ some: "value" })); // {"some":"value"}
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+ The value to clone. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
A copy of the specified value.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+any
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) compareCasePercentage(value) → {number}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.compareCasePercentage()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ The string value to compare the case percentage of. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) compareDates(a, b) → {number}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.compareDates()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ a |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+ The first date to compare. |
+
+
+
+
+
+
+ b |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+ The second date to compare. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) compareVersions(TODO_ARG_NAME) → {TODO_RETURN_TYPE}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.compareVersions()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ TODO_ARG_NAME |
+
+
+
+
+
+TODO_ARG_TYPE
+
+
+
+ |
+
+
+
+
+
+ TODO_ARG_DESC. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+TODO_RETURN_TYPE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) createError(message, statusopt) → {Error}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Deprecated:
- Use new Error() instead. Will be removed in a future release.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
Creates an Error object instance with the specified message and HTTP status code.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.createError("COOL HATS ONLY.", 401)); // new Error("COOL HATS ONLY.") (with status property set to 401)
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ message |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The error message. |
+
+
+
+
+
+
+ status |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ 500
+
+ |
+
+
+ The HTTP status code of the error. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
The error with the specified message and status code property.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+Error
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) createQueryString(TODO_ARG_NAME) → {TODO_RETURN_TYPE}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.createQueryString()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ TODO_ARG_NAME |
+
+
+
+
+
+TODO_ARG_TYPE
+
+
+
+ |
+
+
+
+
+
+ TODO_ARG_DESC. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+TODO_RETURN_TYPE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) createRange(TODO_ARG_NAME) → {TODO_RETURN_TYPE}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Deprecated:
- Determined to no longer be useful, will be removed in a future release.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.createRange()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ TODO_ARG_NAME |
+
+
+
+
+
+TODO_ARG_TYPE
+
+
+
+ |
+
+
+
+
+
+ TODO_ARG_DESC. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+TODO_RETURN_TYPE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) disabledElements(TODO_ARG_NAME) → {TODO_RETURN_TYPE}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Deprecated:
- Use Array.filter() instead. Will be removed in a future release.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.disabledElements()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ TODO_ARG_NAME |
+
+
+
+
+
+TODO_ARG_TYPE
+
+
+
+ |
+
+
+
+
+
+ TODO_ARG_DESC. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+TODO_RETURN_TYPE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) elementsWithAttribute(TODO_ARG_NAME) → {TODO_RETURN_TYPE}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Deprecated:
- Use Array.filter() instead. Will be removed in a future release.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.elementsWithAttribute()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ TODO_ARG_NAME |
+
+
+
+
+
+TODO_ARG_TYPE
+
+
+
+ |
+
+
+
+
+
+ TODO_ARG_DESC. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+TODO_RETURN_TYPE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) elementsWithoutAttribute(TODO_ARG_NAME) → {TODO_RETURN_TYPE}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Deprecated:
- Use Array.filter() instead. Will be removed in a future release.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.elementsWithoutAttribute()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ TODO_ARG_NAME |
+
+
+
+
+
+TODO_ARG_TYPE
+
+
+
+ |
+
+
+
+
+
+ TODO_ARG_DESC. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+TODO_RETURN_TYPE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) enabledElements(TODO_ARG_NAME) → {TODO_RETURN_TYPE}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Deprecated:
- Use Array.filter() instead. Will be removed in a future release.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.enabledElements()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ TODO_ARG_NAME |
+
+
+
+
+
+TODO_ARG_TYPE
+
+
+
+ |
+
+
+
+
+
+ TODO_ARG_DESC. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+TODO_RETURN_TYPE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) equalsIgnoreCase(stringA, stringB) → {boolean}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Case insensitively compares two strings to determine if they are equal.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.equalsIgnoreCase("Test", "TEsT")); // true
console.log(utilities.equalsIgnoreCase("lower", "lower")); // true
console.log(utilities.equalsIgnoreCase("yes", "ye$")); // false
console.log(utilities.equalsIgnoreCase(null, "unknown")); // false
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ stringA |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ The first string to compare. |
+
+
+
+
+
+
+ stringB |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ The second string to compare against |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
.A value of true if the strings are case insensitively equal, otherwise false.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) fileHasExtension(TODO_ARG_NAME) → {TODO_RETURN_TYPE}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.fileHasExtension()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ TODO_ARG_NAME |
+
+
+
+
+
+TODO_ARG_TYPE
+
+
+
+ |
+
+
+
+
+
+ TODO_ARG_DESC. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+TODO_RETURN_TYPE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Deprecated:
- Use formatValue instead. Will be removed in a future release.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.formatObject()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ object |
+
+
+
+
+
+Object
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The object to format. |
+
+
+
+
+
+
+ format |
+
+
+
+
+
+Object
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The format specification. |
+
+
+
+
+
+
+ removeExtra |
+
+
+
+
+
+boolean
+|
+
+Object
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ false
+
+ |
+
+
+ Remove extra flag or formatting options object. |
+
+
+
+
+
+
+ throwErrors |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ false
+
+ |
+
+
+ Remove extra flag or formatting options object. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
The formatted object.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.formatStringList()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+string
+|
+
+Array.<string>
+
+
+
+ |
+
+
+
+
+
+ The string list to format. |
+
+
+
+
+
+
+ stringify |
+
+
+
+
+
+boolean
+|
+
+null
+
+
+
+ |
+
+
+
+
+
+ TODO_ARG_DESC |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
The formatted string list.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.formatValue()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ The value to format. |
+
+
+
+
+
+
+ format |
+
+
+
+
+
+Object
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ The format specification. |
+
+
+
+
+
+
+ options |
+
+
+
+
+
+Object
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+ Formatting options. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+any
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) futureMonths(TODO_ARG_NAME) → {TODO_RETURN_TYPE}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.futureMonths()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ TODO_ARG_NAME |
+
+
+
+
+
+TODO_ARG_TYPE
+
+
+
+ |
+
+
+
+
+
+ TODO_ARG_DESC. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+TODO_RETURN_TYPE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) generateVersions(TODO_ARG_NAME) → {TODO_RETURN_TYPE}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.generateVersions()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ TODO_ARG_NAME |
+
+
+
+
+
+TODO_ARG_TYPE
+
+
+
+ |
+
+
+
+
+
+ TODO_ARG_DESC. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+TODO_RETURN_TYPE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) getFileExtension(TODO_ARG_NAME) → {TODO_RETURN_TYPE}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.getFileExtension()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ TODO_ARG_NAME |
+
+
+
+
+
+TODO_ARG_TYPE
+
+
+
+ |
+
+
+
+
+
+ TODO_ARG_DESC. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+TODO_RETURN_TYPE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) getFileName(filePath) → {string|null}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.getFileName("C:\settings.ini")); // "settings.ini"
console.log(utilities.getFileName("/var/tmp/test.txt")); // "test.txt"
console.log(utilities.getFileName("MyApp.wgt")); // "MyApp.wgt"
console.log(utilities.getFileName(NaN)); // null
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ filePath |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ A file path string to retrieve the file name from. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Returns a string value containing the name of the file or null if the file path was not a string.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+string
+|
+
+null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) getFileNameNoExtension(TODO_ARG_NAME) → {TODO_RETURN_TYPE}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.getFileNameNoExtension()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ TODO_ARG_NAME |
+
+
+
+
+
+TODO_ARG_TYPE
+
+
+
+ |
+
+
+
+
+
+ TODO_ARG_DESC. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+TODO_RETURN_TYPE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) getFilePath(TODO_ARG_NAME) → {TODO_RETURN_TYPE}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.getFilePath()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ TODO_ARG_NAME |
+
+
+
+
+
+TODO_ARG_TYPE
+
+
+
+ |
+
+
+
+
+
+ TODO_ARG_DESC. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+TODO_RETURN_TYPE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) hiddenElements(TODO_ARG_NAME) → {TODO_RETURN_TYPE}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Deprecated:
- Use Array.filter() instead. Will be removed in a future release.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.hiddenElements()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ TODO_ARG_NAME |
+
+
+
+
+
+TODO_ARG_TYPE
+
+
+
+ |
+
+
+
+
+
+ TODO_ARG_DESC. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+TODO_RETURN_TYPE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) indentText(value, amountopt, indentationopt, clearEmptyLinesopt) → {string|null}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.indentText()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The string to indent. |
+
+
+
+
+
+
+ amount |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ 1
+
+ |
+
+
+ The amount of times to indent the string. |
+
+
+
+
+
+
+ indentation |
+
+
+
+
+
+indentation
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ "\t"
+
+ |
+
+
+ The indentation string to use. |
+
+
+
+
+
+
+ clearEmptyLines |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ true
+
+ |
+
+
+ Determines if empty lines should be trimmed or not. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+string
+|
+
+null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) isBoolean(value, allowObjectsopt) → {boolean}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
Checks if the specified value is a boolean.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.isBoolean(false)); // true
console.log(utilities.isBoolean(8675309)); // false
console.log(utilities.isBoolean(new Boolean(true))); // false
console.log(utilities.isBoolean(new Boolean(false), true)); // true
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The value to check. |
+
+
+
+
+
+
+ allowObjects |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ false
+
+ |
+
+
+ Will allow Boolean objects to be treated as valid values. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
A value of true if the specified value is a boolean, otherwise false.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Checks if a specified string value starts with the corresponding comment notation.
+Any whitespace characters at the start of the string will be ignored.
+Empty and non-string values will always result in a value of false being returned.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.isComment("// test comment, please ignore")); // true
console.log(utilities.isComment("# another comment")); // false
console.log(utilities.isComment("# valid comment", "#")); // true
console.log(utilities.isComment("some text")); // false
console.log(utilities.isComment("")); // false
console.log(utilities.isComment(null)); // false
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The value to check. |
+
+
+
+
+
+
+ comment |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ "//"
+
+ |
+
+
+ The comment notation string, can be one or more characters. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
A value of true if the specified value is a string and begins with the corresponding comment notation.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) isDate(value) → {boolean}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
Checks if the specified value is an instance of the Date object.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.isDate(new Date())); // true
console.log(utilities.isDate("June 18")); // false
console.log(utilities.isDate(null)); // false
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+ The value to check. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
A value of true if the specified value is a Date object instance, otherwise false for any other value.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) isDisabled(element) → {boolean}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Deprecated:
- Determined to no longer be useful, will be removed in a future release.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
Checks if an object is disabled or not.
+A value which is not an object is considered to be disabled.
+A property named disabled with a boolean value of true or function returning true is considered to be disabled.
+If there is no property named disabled, but a property named disabled is present with a boolean value of false or function returning false, the object is considered to be disabled.
+If the value does not contain either a enabled or disabled property, it is not considered to be disabled.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.isDisabled({ disabled: true })); // true
console.log(utilities.isDisabled({ disabled: function() { return true; } })); // true
console.log(utilities.isDisabled({ enabled: false })); // true
console.log(utilities.isDisabled({ enabled: function() { return false; } })); // true
console.log(utilities.isDisabled({ })); // false
console.log(utilities.isDisabled(null)); // true
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ element |
+
+
+
+
+
+object
+
+
+
+ |
+
+
+
+
+
+ The element to check. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Returns a value of true if the object is determined to be disabled.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) isEmptyArray(value) → {boolean}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
Checks if the specified value is an array and contains no items.
+Values which are not arrays will always result in a value of false.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.isEmptyArray([])); // true
console.log(utilities.isEmptyArray(new Array())); // true
console.log(utilities.isEmptyArray([null])); // false
console.log(utilities.isEmptyArray({ })); // false
console.log(utilities.isEmptyArray(null)); // false
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+ The value to check. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
A value if true if the specified value is an array and does not contain any items, otherwise false for any other value.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) isEmptyObject(value) → {boolean}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
Checks if the specified value is an object and does not contain any enumerable properties.
+Values which are not strict objects regardless of how many enumerable properties they have will always result in a value of false.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.isEmptyObject({ })); // true
console.log(utilities.isEmptyObject(new Object())); // true
console.log(utilities.isEmptyObject({ example: "data" })); // false
console.log(utilities.isEmptyObject(new Map())); // false
console.log(utilities.isEmptyObject(new Error())); // false
console.log(utilities.isEmptyObject(function() { })); // false
console.log(utilities.isEmptyObject(null)); // false
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+ The value to check. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
A value of true if the specified value is a strict object with no enumerable properties, otherwise false for any other value.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) isEmptyString(value, trimopt) → {boolean}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
Checks if the specified value is an empty string.
+By default this will also trim strings and consider values which only contain whitespace, as well as non-string values to also be empty strings.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.isEmptyString("")); // true
console.log(utilities.isEmptyString("\t")); // true
console.log(utilities.isEmptyString("Door stuck!")); // false
console.log(utilities.isEmptyString(" ", false)); // false
console.log(utilities.isEmptyString(null)); // true
console.log(utilities.isEmptyString([])); // true
console.log(utilities.isEmptyString(NaN)); // true
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The value to check. |
+
+
+
+
+
+
+ trim |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ true
+
+ |
+
+
+ Determines if the value should be trimmed before checking if it is empty. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
A value of true if the specified value is not a string, or is a string and is empty or only contains whitespace characters if trim is set to true.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) isEnabled(element) → {boolean}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Deprecated:
- Determined to no longer be useful, will be removed in a future release.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
Checks if an object is enabled or not.
+A value which is not an object is not considered to be enabled.
+A property named enabled with a boolean value of true or function returning true is considered to be enabled.
+If there is no property named enabled, but a property named disabled is present with a boolean value of false or function returning false, the object is considered to be enabled.
+If the value does not contain either a enabled or disabled property, it is considered to be enabled.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.isEnabled({ enabled: true })); // true
console.log(utilities.isEnabled({ enabled: function() { return true; } })); // true
console.log(utilities.isEnabled({ disabled: false })); // true
console.log(utilities.isEnabled({ disabled: function() { return false; } })); // true
console.log(utilities.isEnabled({ })); // false
console.log(utilities.isEnabled(null)); // false
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ element |
+
+
+
+
+
+object
+
+
+
+ |
+
+
+
+
+
+ The element to check. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Returns a value of true if the object is determined to be enabled.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) isError(value) → {boolean}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Checks if the specified value is an instance of the Error object.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.isError(new Error("Oops."))); // true
console.log(utilities.isError(new SyntaxError("Unknown!"))); // true
console.log(utilities.isError(new DOMException("System failure.", "AbortError"))); // true
console.log(utilities.isError({ message: "fake" })); // false
console.log(utilities.isError(null)); // false
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+ The value to check. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
A value of true if the specified value is an Error object instance, otherwise false for any other value.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) isFloat(value, allowObjectsopt) → {boolean}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
Checks if the specified value is a floating point number either represented in a number type, string type or optionally a Number object.
+Integer values are also considered to be floating point numbers.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.isInteger(7)); // true
console.log(utilities.isInteger(133.7)); // true
console.log(utilities.isInteger("420")); // true
console.log(utilities.isInteger("6.9")); // true
console.log(utilities.isInteger(new Number(64))); // true
console.log(utilities.isInteger(new Number(3.2))); // true
console.log(utilities.isInteger(null)); // false
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The value to check. |
+
+
+
+
+
+
+ allowObjects |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ true
+
+ |
+
+
+ Will allow Number objects to be treated as valid values. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
A value of true if the specified value is a floating point number, otherwise false.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) isFunction(value) → {boolean}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Checks if the specified value is an instance of the Function object.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.isFunction(function() { })); // true
console.log(utilities.isFunction(console.log)); // true
console.log(utilities.isFunction({ })); // false
console.log(utilities.isFunction({ })); // false
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+ The value to check. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
A value of true if the specified value is a Function object instance, otherwise false for any other value.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) isHidden(element) → {boolean}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Deprecated:
- Determined to no longer be useful, will be removed in a future release.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
Checks if an object is hidden or not.
+A value which is not an object is considered to be hidden.
+A property named hidden with a boolean value of true or function returning true is considered to be hidden.
+If there is no property named hidden, but a property named hidden is present with a boolean value of false or function returning false, the object is considered to be hidden.
+If the value does not contain either a visible or hidden property, it is not considered to be hidden.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.isHidden({ hidden: true })); // true
console.log(utilities.isHidden({ hidden: function() { return true; } })); // true
console.log(utilities.isHidden({ visible: false })); // true
console.log(utilities.isHidden({ visible: function() { return false; } })); // true
console.log(utilities.isHidden({ })); // false
console.log(utilities.isHidden(null)); // true
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ element |
+
+
+
+
+
+object
+
+
+
+ |
+
+
+
+
+
+ The element to check. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Returns a value of true if the object is determined to be hidden.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) isInteger(value, allowObjectsopt) → {boolean}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
Checks if the specified value is an integer either represented in a number type, string type or optionally a Number object.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.isInteger(7)); // true
console.log(utilities.isInteger(133.7)); // false
console.log(utilities.isInteger("420")); // true
console.log(utilities.isInteger("6.9")); // false
console.log(utilities.isInteger(new Number(64))); // true
console.log(utilities.isInteger(new Number(3.2))); // false
console.log(utilities.isInteger(null)); // false
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The value to check. |
+
+
+
+
+
+
+ allowObjects |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ true
+
+ |
+
+
+ Will allow Number objects to be treated as valid values. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
A value of true if the specified value is an integer, otherwise false.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) isInvalid(value) → {boolean}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
Checks if the specified value is null or undefined.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.isInvalid(69)); // false
console.log(utilities.isInvalid(undefined)); // true
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+ The value to check. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
A value of true if the specified value is null or undefined, otherwise false.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) isInvalidNumber(value) → {boolean}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
Checks if the specified value is not a valid number.
+Values of NaN, +/- Infinity and Number objects are also not considered to be valid numbers.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.isInvalidNumber(7331)); // false
console.log(utilities.isInvalidNumber(-2.718281828459045)); // false
console.log(utilities.isInvalidNumber("7")); // true
console.log(utilities.isInvalidNumber(new Number(65534))); // true
console.log(utilities.isInvalidNumber(NaN)); // true
console.log(utilities.isInvalidNumber(Infinity)); // true
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+ The value to check. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
A value of true if the specified value is not a valid number, otherwise false.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) isNonEmptyArray(value) → {boolean}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
Checks if the specified value is an array and contains at least one item.
+Values which are not arrays will always result in a value of false.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.isEmptyArray([])); // false
console.log(utilities.isEmptyArray(new Array())); // false
console.log(utilities.isEmptyArray([null])); // true
console.log(utilities.isEmptyArray([4, 2, 0])); // true
console.log(utilities.isEmptyArray({ })); // false
console.log(utilities.isEmptyArray(null)); // false
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+ The value to check. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
A value if true if the specified value is an array and contains at least one item, otherwise false for any other value.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) isNonEmptyObject(value) → {boolean}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
Checks if the specified value is an object and contains at least one enumerable property.
+Values which are not strict objects regardless of how many properties they have will always result in a value of false.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.isEmptyObject({ })); // false
console.log(utilities.isEmptyObject(new Object())); // false
console.log(utilities.isEmptyObject({ example: "data" })); // true
console.log(utilities.isEmptyObject(new Map())); // false
console.log(utilities.isEmptyObject(new Error())); // false
console.log(utilities.isEmptyObject(function() { })); // false
console.log(utilities.isEmptyObject(null)); // false
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+ The value to check. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
A value of true if the specified value is a strict object with at least one enumerable property, otherwise false for any other value or strict object with no enumerable properties.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) isNonEmptyString(value, trimopt) → {boolean}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
Checks if the specified value is a non-empty string.
+By default this will also trim strings and consider values which only contain whitespace to be empty strings.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.isNonEmptyString("")); // false
console.log(utilities.isNonEmptyString("\t")); // false
console.log(utilities.isNonEmptyString("Door stuck!")); // true
console.log(utilities.isNonEmptyString(" ", false)); // true
console.log(utilities.isNonEmptyString(null)); // false
console.log(utilities.isNonEmptyString([])); // false
console.log(utilities.isNonEmptyString(NaN)); // false
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The value to check. |
+
+
+
+
+
+
+ trim |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ true
+
+ |
+
+
+ Determines if the value should be trimmed before checking if it is not empty. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
A value of false if the specified value is not a string, or is a string and is empty or only contains whitespace characters if trim is set to true.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) isObject(value, strictopt) → {boolean}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
Checks if the specified value is an object.
+Functions and values of null are not considered to be real objects.
+Any object which inherits from object will yield a result of true unless strict is set to true.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.isObject({ please: "ignore" })); // true
console.log(utilities.isObject(new Object())); // true
console.log(utilities.isObject([1, 2, 3])); // true
console.log(utilities.isObject(new Date())); // true
console.log(utilities.isObject(new Date(), true)); // false
console.log(utilities.isObject(function() { })); // false
console.log(utilities.isObject(null)); // false
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The value to check. |
+
+
+
+
+
+
+ strict |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ false
+
+ |
+
+
+ Only consider values which have Object for a constructor as objects when checking the value. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
A value of true if the specified value is an object, otherwise false if it inhertis from object and strict is set to true, or it is any other value type.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) isObjectStrict(value) → {boolean}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
Checks if the specified value is a strict object by checking that the value's constructor is Object.
+Functions and values of null are not considered to be strict objects.
+Any object which inherits from object will yield a result of false.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.isObjectStrict({ foo: "bar" })); // true
console.log(utilities.isObjectStrict(new Object())); // true
console.log(utilities.isObjectStrict(["a", "b", "c"])); // false
console.log(utilities.isObjectStrict(new Error("?"))); // false
console.log(utilities.isObjectStrict(function() { })); // false
console.log(utilities.isObjectStrict(null)); // false
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+ The value to check. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
A value of true if the specified value is an object and has Object for a constructor, otherwise false for any other value.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) isRegularExpression(value) → {boolean}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
Checks if the specified value is an instance of the RegExp object.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.isRegularExpression(/te|st/gmi)); // true
console.log(utilities.isRegularExpression(new RegExp("https?"))); // true
console.log(utilities.isRegularExpression("/hi/")); // false
console.log(utilities.isRegularExpression({ }})); // false
console.log(utilities.isRegularExpression(null)); // false
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+ The value to check. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
A value of true if the specified value is a RegExp object instance, otherwise false for any other value.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) isValid(value) → {boolean}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
Checks that the specified value is not null or undefined.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.isValid(42)); // true
console.log(utilities.isValid(null)); // false
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+ The value to check. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
A value of true if the specified value is not null or undefined, otherwise false.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) isValidNumber(value) → {boolean}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
Checks that that the specified value is a valid number.
+Values of NaN, +/- Infinity and Number objects are not considered to be valid numbers.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.isValidNumber(1337)); // true
console.log(utilities.isValidNumber(-3.141592654)); // true
console.log(utilities.isValidNumber("32767")); // false
console.log(utilities.isValidNumber(new Number(65534))); // false
console.log(utilities.isValidNumber(NaN)); // false
console.log(utilities.isValidNumber(-Infinity)); // false
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+ The value to check. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
A value of true if the specified value is a valid number, otherwise false.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) isVisible(element) → {boolean}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Deprecated:
- Determined to no longer be useful, will be removed in a future release.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
Checks if an object is visible or not.
+A value which is not an object is not considered to be visible.
+A property named visible with a boolean value of true or function returning true is considered to be visible.
+If there is no property named visible, but a property named hidden is present with a boolean value of false or function returning false, the object is considered to be visible.
+If the value does not contain either a visible or hidden property, it is considered to be visible.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.isVisible({ visible: true })); // true
console.log(utilities.isVisible({ visible: function() { return true; } })); // true
console.log(utilities.isVisible({ hidden: false })); // true
console.log(utilities.isVisible({ hidden: function() { return false; } })); // true
console.log(utilities.isVisible({ })); // false
console.log(utilities.isVisible(null)); // false
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ element |
+
+
+
+
+
+object
+
+
+
+ |
+
+
+
+
+
+ The element to check. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Returns a value of true if the object is determined to be visible.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) joinPaths(paths, optionsopt) → {string}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.joinPaths()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ paths |
+
+
+
+
+
+string
+|
+
+Array.<string>
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ TODO_ARG_DESC. |
+
+
+
+
+
+
+ options |
+
+
+
+
+
+Object
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+ TODO_ARG_DESC. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) leftShift(number, bits) → {number}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.leftShift()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ number |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The number value to bit shift. |
+
+
+
+
+
+
+ bits |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The number of bits to shift the value left by. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
The number value right shifted by the specified number of bits.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) matchAttribute(TODO_ARG_NAME) → {TODO_RETURN_TYPE}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Deprecated:
- Use Array.filter() instead. Will be removed in a future release.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.matchAttribute()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ TODO_ARG_NAME |
+
+
+
+
+
+TODO_ARG_TYPE
+
+
+
+ |
+
+
+
+
+
+ TODO_ARG_DESC. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+TODO_RETURN_TYPE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) merge(a, b, copyopt, deepMergeopt) → {Object|null}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.merge({ a: 1 }, { b: 2 })); // { a: 1, b: 2 }
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ a |
+
+
+
+
+
+Object
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The object to merge into. |
+
+
+
+
+
+
+ b |
+
+
+
+
+
+Object
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The object whose properties are being merged. |
+
+
+
+
+
+
+ copy |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ true
+
+ |
+
+
+ Determines if a copy of the first object should be made before merging. |
+
+
+
+
+
+
+ deepMerge |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ true
+
+ |
+
+
+ Determines if properties should be recursively merged or just the base properties. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+Object
+|
+
+null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) parseBoolean(value, defaultValueopt) → {boolean|null}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
Parses a boolean from a given value.
+If no valid boolean value can be determined, defaultValue is returned instead which by default has a value of null.
+There are many possibilities for valid truthy boolean values including:
+
+- true
+- new Boolean(true)
+- 1
+- "1"
+- "true"
+- "yes"
+- "on"
+- "t"
+- "y"
+
+
As well as a number of possibilities for valid falsey boolean values:
+
+- false
+- new Boolean(false)
+- 0
+- "0"
+- "false"
+- "no"
+- "off"
+- "f"
+- "n"
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.parseBoolean(true)); // true
console.log(utilities.parseBoolean("false")); // false
console.log(utilities.parseBoolean("yes")); // true
console.log(utilities.parseBoolean(1)); // true
console.log(utilities.parseBoolean(4)); // null
console.log(utilities.parseBoolean("wat")); // null
console.log(utilities.parseBoolean("wot", true)); // true
console.log(utilities.parseBoolean("huh", 420)); // null
console.log(utilities.parseBoolean(null)); // null
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The value to parse into a boolean. |
+
+
+
+
+
+
+ defaultValue |
+
+
+
+
+
+boolean
+|
+
+null
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ null
+
+ |
+
+
+ The value to return if no valid boolean value can be determined. Specifying a non-boolean value will result in null being used instead. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
A value of true if a valid truthy value was determined from the specified value, false if a valid falsey value was determined, otherwise the default value is returned. A value of null will be returned if the default value is not specified.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+boolean
+|
+
+null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) parseDate(value, defaultValueopt) → {Date|null}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
Parses a date object from a given value.
+Accepts date object, date string, timestamp number string and timestamp number values.
+If no valid date object can be determined from the specified value, the default value is returned instead.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.parseDate("June 18, 1987 3:30 PM")); // new Date("1987-06-18T19:30:00.000Z")
console.log(utilities.parseDate("2018-02-19T06:19:33Z")); // new Date("2018-02-19T06:19:33.000Z")
console.log(utilities.parseDate(new Date("2020-03-28T18:52:05.136Z"))); // new Date("2020-03-28T18:52:05.136Z")
console.log(utilities.parseDate(1585421525139)); // new Date("2020-03-28T18:52:05.136Z")
console.log(utilities.parseDate("1585421525139")); // new Date("2020-03-28T18:52:05.136Z")
console.log(utilities.parseDate(-1, new Date(0))); // new Date("1970-01-01T00:00:00.000Z")
console.log(utilities.parseDate(-420)); // null
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The value to parse into a date object. |
+
+
+
+
+
+
+ defaultValue |
+
+
+
+
+
+Date
+|
+
+null
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ null
+
+ |
+
+
+ The default value to return if the specified value is not a valid date or timestamp. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
A Date object instance if a valid date was determined from the specified value, otherwise the default value is returned. A value of null will be returned if the default value is not specified.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+Date
+|
+
+null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) parseEmail(value) → {string|null}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.parseEmail()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ A string containing an email address. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+string
+|
+
+null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) parseEmailDomain(value) → {string|null}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Deprecated:
- Use value.split("@", 2)[1] instead. Will be removed in a future release.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.parseEmailDomain()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ A string containing an email address. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+string
+|
+
+null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) parseFloat(value, defaultValueopt) → {number}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
Parses a floating point number from a given value.
+Accepts number, string and number object values.
+If no valid floating point number can be determined from the specified value, the default value is returned instead.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.parseFloat(-999)); // -999
console.log(utilities.parseFloat(13.37)); // 13.37
console.log(utilities.parseFloat("51")); // 51
console.log(utilities.parseFloat("-867.5309")); // -867.5309
console.log(utilities.parseFloat(new Number(-4231))); // -4231
console.log(utilities.parseFloat(new Number(9.999))); // 9.999
console.log(utilities.parseFloat("wat", 10010101); // 10010101
console.log(utilities.parseFloat(null); // NaN
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The value to parse into a floating point number. |
+
+
+
+
+
+
+ defaultValue |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ NaN
+
+ |
+
+
+ The default value to return if the specified value is not a floating point number. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
A floating point number value if a valid number value was determined from the specified value, otherwise the default value is returned. A value of NaN will be returned if the default value is not specified.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) parseFloatingPointNumber(value, defaultValueopt) → {number}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Deprecated:
- Use utilities.parseFloat instead. Will be removed in a future release.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
Parses a floating point number from a given value.
+Accepts number, string and number object values.
+If no valid floating point number can be determined from the specified value, the default value is returned instead.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.parseFloatingPointNumber(-1)); // -1
console.log(utilities.parseFloatingPointNumber(2.2)); // 1.1
console.log(utilities.parseFloatingPointNumber("3")); // 3
console.log(utilities.parseFloatingPointNumber("4.4")); // 4.4
console.log(utilities.parseFloatingPointNumber(new Number(-5))); // -5
console.log(utilities.parseFloatingPointNumber(new Number(6.6))); // 6.6
console.log(utilities.parseFloatingPointNumber("nope.avi", 69); // 69
console.log(utilities.parseFloatingPointNumber(null); // NaN
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The value to parse into a floating point number. |
+
+
+
+
+
+
+ defaultValue |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ NaN
+
+ |
+
+
+ The default value to return if the specified value is not a floating point number. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
A floating point number value if a valid number value was determined from the specified value, otherwise the default value is returned. A value of NaN will be returned if the default value is not specified.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) parseInteger(value, defaultValueopt) → {number}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
Parses an integer number from a given value.
+Accepts number, string and number object values.
+If no valid integer number can be determined from the specified value, the default value is returned instead.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.parseInteger(88)); // 88
console.log(utilities.parseInteger(-73.31)); // -73
console.log(utilities.parseInteger("-15")); // -15
console.log(utilities.parseInteger("3.141592654")); // 3
console.log(utilities.parseInteger(new Number(4096))); // 4096
console.log(utilities.parseInteger(new Number(3.333))); // 3
console.log(utilities.parseInteger("wat", 11100101); // 11100101
console.log(utilities.parseInteger(null); // NaN
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The value to parse into a integer number. |
+
+
+
+
+
+
+ defaultValue |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ NaN
+
+ |
+
+
+ The default value to return if the specified value is not an integer or floating point number. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
An integer number value if a valid number value was determined from the specified value, otherwise the default value is returned. A value of NaN will be returned if the default value is not specified.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) parseRegularExpression(value, throwErrorsopt) → {RegExp|null}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.parseRegularExpression("/(regexp?)/gi")); // new RegExp("(regexp?)", "gi")
console.log(utilities.parseRegularExpression(new RegExp("ok"))); // new RegExp("ok")
console.log(utilities.parseRegularExpression({ })); // null
console.log(utilities.parseRegularExpression(/invalid/x, true)); // throws Error
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The string value to parse a regular expression from. |
+
+
+
+
+
+
+ throwErrors |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ false
+
+ |
+
+
+ Determines if errors should be thrown or not when invalid regular expression values are encountered. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Throws:
+
+
+
+
+
+
Will optionally throw an error if the regular expression is invalid and throwErrors is set to true.
+
+
+
+
+
+
+
+Returns:
+
+
+
+
Returns a RegExp object instance if a valid regular expression was parsed from the specified value or null if the value was invalid and throwErrors is unspecified or set to false.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+RegExp
+|
+
+null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) parseStringList(value) → {Array.<string>|null}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.parseStringList("w, a, t")); // ["w", "a", "t"]
console.log(utilities.parseStringList("ok")); // ["ok"]
console.log(utilities.parseStringList([])); // null
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ A comma or semicolon separated list of string values. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
An array of strings as parsed from the specified string list or null if the specified value is not a string.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+Array.<string>
+|
+
+null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) parseTime(value) → {Object}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.parseTime()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+ TODO_ARG_DESC. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) parseVersion(TODO_ARG_NAME) → {TODO_RETURN_TYPE}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.parseVersion()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ TODO_ARG_NAME |
+
+
+
+
+
+TODO_ARG_TYPE
+
+
+
+ |
+
+
+
+
+
+ TODO_ARG_DESC. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+TODO_RETURN_TYPE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) parseYouTubeLink(value) → {string|null}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.parseYouTubeLink("http://youtube.com/v/OEEEy1dMceI")); // OEEEy1dMceI
console.log(utilities.parseYouTubeLink("https://www.youtube.com/watch?v=NUnwFHplBg4")); // NUnwFHplBg4
console.log(utilities.parseYouTubeLink("www.youtu.be/watch?v=Dkm8Hteeh6M")); // Dkm8Hteeh6M
console.log(utilities.parseYouTubeLink("https://youtu.be/v/z874bjpO9d8")); // z874bjpO9d8
console.log(utilities.parseYouTubeLink("https://www.nitro404.com")); // null
console.log(utilities.parseYouTubeLink(NaN)); // null
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ The string URL value to parse a YouTube video identifier from. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
A string value containing the YouTube video ID or null if the video ID could be determined from the specified value.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+string
+|
+
+null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) prependSlash(TODO_ARG_NAME) → {TODO_RETURN_TYPE}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.prependSlash()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ TODO_ARG_NAME |
+
+
+
+
+
+TODO_ARG_TYPE
+
+
+
+ |
+
+
+
+
+
+ TODO_ARG_DESC. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+TODO_RETURN_TYPE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) replaceNonBreakingSpaces(value) → {string|null}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.replaceNonBreakingSpaces()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ The string to replace non breaking spaces in. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+string
+|
+
+null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) reverseFileExtension(TODO_ARG_NAME) → {TODO_RETURN_TYPE}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.reverseFileExtension()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ TODO_ARG_NAME |
+
+
+
+
+
+TODO_ARG_TYPE
+
+
+
+ |
+
+
+
+
+
+ TODO_ARG_DESC. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+TODO_RETURN_TYPE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) reverseString(value) → {string|null}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Reverses a string value with special handling for unicode characters.
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.reverseString("backwards")); // "sdrawkcab"
console.log(utilities.reverseString(NaN)); // null
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ The string value to reverse. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
The reversed representation of the specified string value or a value of null if the specified value is not a string.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+string
+|
+
+null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) rightShift(number, bits) → {number}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.rightShift()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ number |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The number value to bit shift. |
+
+
+
+
+
+
+ bits |
+
+
+
+
+
+number
+
+
+
+ |
+
+
+
+
+
+ The number of bits to shift the value right by. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
The number value right shifted by the specified number of bits.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) toString(value) → {string}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.toString(undefined)); // "undefined"
console.log(utilities.toString(null)); // "null"
console.log(utilities.toString(Infinity)); // "Infinity"
console.log(utilities.toString(-Infinity)); // "-Infinity"
console.log(utilities.toString(NaN)); // "NaN"
console.log(utilities.toString("test")); // "\"test\""
console.log(utilities.toString(new Date(0))); // "1970-01-01T00:00:00.000Z"
console.log(utilities.toString(function() { })); // "function() { }"
console.log(utilities.toString({ door: "stuck" })); // "{\"door":\"stuck\"}"
console.log(utilities.toString([4, 2, "0"])); // "[4,2,\"0\"]"
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+any
+
+
+
+ |
+
+
+
+
+
+ The value to convert into a string. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
A string representation of the specified value.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) trimLeadingZeroes(value) → {TODO_RETURN_TYPE}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.trimLeadingZeroes()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ The string to remove leading zeroes from. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+TODO_RETURN_TYPE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) trimNullTerminatedString(value, defaultValueopt) → {string|null}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.trimNullTerminatedString()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The null-terminated string to trim. |
+
+
+
+
+
+
+ defaultValue |
+
+
+
+
+
+string
+|
+
+null
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ null
+
+ |
+
+
+ The default value to return if the specified value is not a string. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+string
+|
+
+null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) trimString(value, defaultValueopt) → {string|null}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.trimString()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The string to trim. |
+
+
+
+
+
+
+ defaultValue |
+
+
+
+
+
+string
+|
+
+null
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ null
+
+ |
+
+
+ The default value to return if the specified value is not a string. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+string
+|
+
+null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) trimTrailingNewlines(value, defaultValueopt) → {string|null}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.trimTrailingNewlines()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The string to trim trailing newline characters from. |
+
+
+
+
+
+
+ defaultValue |
+
+
+
+
+
+string
+|
+
+null
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ null
+
+ |
+
+
+ The default value to return if the specified value is not a string. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+string
+|
+
+null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) trimWhitespace(value, trimNewlines, defaultValueopt) → {string|null}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.trimWhitespace()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ value |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The string to trim whitespace characters from. |
+
+
+
+
+
+
+ trimNewlines |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ TODO_ARG_DESC. |
+
+
+
+
+
+
+ defaultValue |
+
+
+
+
+
+string
+|
+
+null
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ null
+
+ |
+
+
+ The default value to return if the specified value is not a string. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+string
+|
+
+null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) truncateFileName(TODO_ARG_NAME) → {TODO_RETURN_TYPE}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.truncateFileName()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ TODO_ARG_NAME |
+
+
+
+
+
+TODO_ARG_TYPE
+
+
+
+ |
+
+
+
+
+
+ TODO_ARG_DESC. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+TODO_RETURN_TYPE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (static) visibleElements(TODO_ARG_NAME) → {TODO_RETURN_TYPE}
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+ - Since:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Deprecated:
- Use Array.filter() instead. Will be removed in a future release.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+ console.log(utilities.visibleElements()); // TODO_RESULT
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ TODO_ARG_NAME |
+
+
+
+
+
+TODO_ARG_TYPE
+
+
+
+ |
+
+
+
+
+
+ TODO_ARG_DESC. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+TODO_RETURN_TYPE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+