commonMain.community.flock.wirespec.openapi.Common.kt Maven / Gradle / Ivy
package community.flock.wirespec.openapi
import community.flock.wirespec.compiler.core.emit.common.Emitter.Companion.firstToUpper
object Common {
fun className(vararg arg: String) = arg
.flatMap { it.split("-", "/") }
.joinToString("") { it.firstToUpper() }
fun Map.filterNotNullValues(): Map =
mapNotNull { (key, value) -> value?.let { key to it } }.toMap()
}