@vsokolov/utils - v0.32.0
    Preparing search index...

    Function occurrenceCount

    • Count occurrences of each unique element in the array

      Type Parameters

      • T

      Parameters

      • data: T[]

        Array of data to count occurrences

      Returns Record<string, number>

      Object with unique elements as keys and their occurrence counts as values