Skip to content

hasEnv

hasEnv(name) → boolean · System

Check if an environment variable exists (is set, even if empty).

  • name (required): environment variable name
utlx
{
  hasDatabase: hasEnv("DATABASE_URL"),
  hasSecret: hasEnv("API_SECRET")
}

Security note: can be restricted in UTLXe via security policy (Chapter 38) to prevent probing for host secrets.

Released under AGPL-3.0.