Creates a duplicate-free version of an array, it accepts comparator which is invoked to compare elements of array
unique array
uniqWith([{ x: 1, y: 2 }, { x: 1, y: 3 }, { x: 2, y: 4 }, { x: 1, y: 2 }],(arrayValue, otherValue) => arrayValue.x === otherValue.x);// returns [{ x: 1, y: 2 }, { x: 2, y: 4 }] Copy
uniqWith([{ x: 1, y: 2 }, { x: 1, y: 3 }, { x: 2, y: 4 }, { x: 1, y: 2 }],(arrayValue, otherValue) => arrayValue.x === otherValue.x);// returns [{ x: 1, y: 2 }, { x: 2, y: 4 }]
Generated using TypeDoc
Creates a duplicate-free version of an array, it accepts comparator which is invoked to compare elements of array