Env

external interface Env(source)

Read-only environment API.

Functions

Link copied to clipboard
abstract operator fun get(key: String): String?

Gets the value of an environment variable or null if key doesn't exist.

Link copied to clipboard
abstract fun has(key: String): Boolean

Whether an environment variable is set for key.

Link copied to clipboard
fun Env.require(key: String): String

Gets the environment variables for key or throws an ISE if no value is present.

Link copied to clipboard
abstract fun toObject(): dynamic

Returns a snapshot of the environment variables at invocation.