JS Utils Kit
    Preparing search index...

    Function hasEnv

    • Check if an environment variable exists.

      Parameters

      • k: string

        Environment variable name

      Returns boolean

      • This only checks whether the variable key is present in the environment object.
      • It does not check whether the value is empty.
      if (hasEnv("CI")) {
      console.log("Running in CI environment");
      }