groupDistinct

source

groupDistinct<K, V>(items: Iterable<V>, keyFn: Function): SetMapsource

Group a collection of items by applying a key function to produce a SetMap of keys to distinct items.

If the key function for a given item returns undefined, that item is discarded.