Hex Core JS
    Preparing search index...

    Function filterUniqueObjects

    • Returns an array with duplicates removed from the given array. Used for arrays of objects and uniqueness checks can use a subset of keys (e.g. "name" or "id"). Array order is stable and the first repeated element is preserved, while duplicate elements are removed. Elements that are null or undefined are removed.

      Type Parameters

      • T

      Parameters

      • array: (T | null | undefined)[]

        The array to remove duplicates from.

      • keys: TypeOrArray<keyof T> = []

        The subset of keys to use for uniqueness.

      Returns T[]