• unique array

    • array of string,number
    • array of object by object key

    Returns

    Example

    arrayOfObjUniq({p:'x',n:'x'},{p:'23',n:'x'},{p:'x',n:'5g'}, 'p'); // [{p:'x',n:'x'},{p:'23',n:'x'}]
    

    Link

    https://stackoverflow.com/a/67322087/6404439

    Type Parameters

    • T extends any[]

    Parameters

    • arr: T
    • Optional field: string

      key name (for array of object)

    Returns T