/is-odd.kt

Kotlin port and bindings for very popular JavaScript library is-odd

Primary LanguageKotlinDo What The F*ck You Want To Public LicenseWTFPL

is-odd.kt

Kotlin port of very popular JavaScript library is-odd

Kotlin/JS introduced a cool thing to Kotlin which we were all missing before. The dynamic type. But there is only one problem with that. You can no longer figure out whether something is even or odd. So this library introduces a very helpful helper function called isOdd

How this works

  • On Kotlin/JS this uses the very popular library is-odd
  • On all Kotlin/JVM and Kotlin/Native this uses its own implementation: IsOdd.kt

Usage

The library is hosted on Bintray

Gradle:

    kotlin {
        sourceSets {
            commonMain {
                repositories {
                    maven("https://dl.bintray.com/drschlaubi/maven")
                }
                
                dependencies {
                    implementation("me.schlaubi", "is-odd", "1.0.0")
                }
            }
        }    
    }