filterUniqueBy
Creates an array with the unique values filtered out, based on a provided comparator function.
- Use
Array.prototype.filter()andArray.prototype.every()to create an array containing only the non-unique values, based on the comparator function,fn. - The comparator function takes four arguments: the values of the two elements being compared and their indexes.