Prelude API
    Preparing search index...

    Function areUnique

    • Checks if all elements in the iterable are unique according to their values or a derived key.

      Type Parameters

      • T
      • U

      Parameters

      • values: Iterable<T>

        The iterable to check for uniqueness

      • OptionalmaybeKeyOfValue: (value: T) => U

        Optional function to extract a key for uniqueness comparison (identity is used if not provided)

      Returns boolean

      true if all elements are unique, false if duplicates exist