groupBy

fun <T : Any, K> groupBy(items: ReadonlyArray<T>, keySelector: (value: T, index: Int) -> K): JsMap<K, ReadonlyArray<T>>(source)