CodBi
    Preparing search index...
    • Removes duplicate items from an array based on an optional property.

      Parameters

      • toFilter: unknown[]

        The array of items to filter for duplicates.

      • by: string = undefined

        The property name to use for deduplication. If undefined, uses the Set-based approach for primitive values.

      Returns unknown[]

      A new array with duplicate items removed. If by is specified, duplicates are identified by comparing the value of that property. Otherwise, duplicates are identified using Set equality.