satisfiesAny

Determines whether a Version satisfies at least one Constraint in a collection or not.

Samples

import io.github.z4kn4fein.semver.Inc
import io.github.z4kn4fein.semver.LooseVersionSerializer
import io.github.z4kn4fein.semver.Version
import io.github.z4kn4fein.semver.VersionSerializer
import io.github.z4kn4fein.semver.constraints.toConstraint
import io.github.z4kn4fein.semver.inc
import io.github.z4kn4fein.semver.nextMajor
import io.github.z4kn4fein.semver.nextMinor
import io.github.z4kn4fein.semver.nextPatch
import io.github.z4kn4fein.semver.nextPreRelease
import io.github.z4kn4fein.semver.satisfies
import io.github.z4kn4fein.semver.satisfiesAll
import io.github.z4kn4fein.semver.satisfiesAny
import io.github.z4kn4fein.semver.toVersion
import io.github.z4kn4fein.semver.toVersionOrNull
import io.github.z4kn4fein.semver.withoutSuffixes
import kotlinx.serialization.json.Json

fun main() { 
   //sampleStart 
   val constraints = listOf(">=1.1.0", "~1").map { it.toConstraint() }
val version = "1.1.1".toVersion()
print("$version satisfies ${constraints.joinToString(" or ")}? ${version satisfiesAny constraints}") 
   //sampleEnd
}