All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.community.flock.wirespec.openapi.Common.kt Maven / Gradle / Ivy

There is a newer version: 0.10.17
Show newest version
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()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy