Returns array with elements unique by key function

  • Type Parameters

    • T

    Parameters

    • f: (x: T) => any

      Function to generate key for each element

    • xs: T[]

      Input array

    Returns T[]

    Array with elements unique by key