toNotEmptyMapOrElse

inline fun <K, V> Map<K, V>.toNotEmptyMapOrElse(defaultValue: (Map<K, V>) -> NotEmptyMap<K, V>): NotEmptyMap<K, V>

Returns a NotEmptyMap containing all the entries of this map, or returns the result of calling the defaultValue function if this map is empty.