import { filterNonUniqueBy } from "https://deno.land/x/30_seconds_of_typescript@v1.0.1/util.ts";
Filters out the non-unique values in an array, based on a provided comparator function.
Use Array.prototype.filter()
and Array.prototype.every()
for an array containing only the 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.