Util

Util contains utility methods.

Methods 

  • addClass()

    Adds a CSS class to a component.

  • getBooleanValue()

    Coerces truthy and falsy values into a native boolean.

  • hasClass()

    Checks whether the component has the specified CSS class.

  • isArray()

    Checks whether the specified object is an array.

  • isEmpty()

    Checks if the object is empty. An empty object’s value is undefined, null, an empty array, or an empty string. An object with no native properties is not considered empty.

  • isObject()

    Checks whether the specified object is a valid object. A valid object is not a DOM element, is not a native browser class (XMLHttpRequest) is not falsey, and is not an array, error, function string or a number.

  • isUndefined()

    Checks if the object is undefined.

  • isUndefinedOrNull()

    Checks if the object is undefined or null.

  • removeClass()

    Removes a CSS class from a component.

  • toggleClass()

    Toggles (adds or removes) a CSS class from a component.