compilationTarget

The compilation target of the current platform.

Example usage:

val platform = KPlatform()

if (platform.compilationTarget.isWeb) {
// Execute code that should only run on web targets
}

// or use a switch

when (platform.compilationTarget) {
CompilationTarget.JS -> {
// Execute code that should only run on JS targets
}
else -> {
// Do something else
}
}