---
schema_version: "1"
id: dbcc5e703b76c6eaf47e83cbee545aa492ac7245c53dac79dd632d618baa3ce5
title: Util
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/aura-platform/guides/aura/ref-jsapi/ref-jsapi-util.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/ref-jsapi-util.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: ff56dbd19e415eae1d882262ae9eb0219663c441626ebaaa9cc4b9f36d15c4e5
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# Util

`Util` contains utility methods.

## Methods

-   **[addClass()](https://developer.salesforce.com/docs/platform/aura-platform/guide/ref-jsapi-util-addclass.md)**  


    Adds a CSS class to a component.

-   **[getBooleanValue()](https://developer.salesforce.com/docs/platform/aura-platform/guide/ref-jsapi-util-getbooleanvalue.md)**  


    Coerces truthy and falsy values into a native boolean.

-   **[hasClass()](https://developer.salesforce.com/docs/platform/aura-platform/guide/ref-jsapi-util-hasclass.md)**  


    Checks whether the component has the specified CSS class.

-   **[isArray()](https://developer.salesforce.com/docs/platform/aura-platform/guide/ref-jsapi-util-isarray.md)**  


    Checks whether the specified object is an array.

-   **[isEmpty()](https://developer.salesforce.com/docs/platform/aura-platform/guide/ref-jsapi-util-isempty.md)**  


    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()](https://developer.salesforce.com/docs/platform/aura-platform/guide/ref-jsapi-util-isobject.md)**  


    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()](https://developer.salesforce.com/docs/platform/aura-platform/guide/ref-jsapi-util-isundefined.md)**  


    Checks if the object is `undefined`.

-   **[isUndefinedOrNull()](https://developer.salesforce.com/docs/platform/aura-platform/guide/ref-jsapi-util-isundefinedornull.md)**  


    Checks if the object is `undefined` or `null`.

-   **[removeClass()](https://developer.salesforce.com/docs/platform/aura-platform/guide/ref-jsapi-util-removeclass.md)**  


    Removes a CSS class from a component.

-   **[toggleClass()](https://developer.salesforce.com/docs/platform/aura-platform/guide/ref-jsapi-util-toggleclass.md)**  


    Toggles (adds or removes) a CSS class from a component.


