Function countEach

  • Count occurrences of each distinct value.

    Type Parameters

    • T

    • U = T

    Parameters

    • x: T[]

      an array

    • fm: MapFunction<T, T | U> = null

      map function (v, i, x)

    Returns Map<T | U, number>

    Map {value ⇒ count}

Generated using TypeDoc