Only returns unique elements by comparing the result of the mapping function applied to the element. Beware: all mapped elements need to fit in memory to keep track of the ones that we already have seen!
pipe( itr8.itr8FromArrayAsync([ { id: 1 }, { id: 2 }, { id: 2 }, { id: 3 }, { id: 4 }, { id: 4 }, { id: 3 } ]) itr8.uniqBy((a:{ id:number }) => id ) // => [ [ { id: 1 }, { id: 2 }, { id: 3 }, { id: 4 } ]; );
Generated using TypeDoc
Only returns unique elements by comparing the result of the mapping function applied to the element. Beware: all mapped elements need to fit in memory to keep track of the ones that we already have seen!
Example