# Function compareAsync

- compareAsync<T, U>(collection1, collection2, options): Promise<void>

- Compares two collections and invokes callbacks for items that are new, missing, or matching in the second collection relative to the first.

  #### Type Parameters

  - T
  - U

  #### Parameters

  - collection1: Collection<T> | Iterable<T, any, any>

    The first collection.

  - collection2: Collection<U> | Iterable<U, any, any>

    The second collection to compare to the first.

  - options: CompareOptions<T, U>

    Options specifying the callbacks to invoke.

  #### Returns Promise<void>