Skip to main content
Module

x/uuid/lib/lib.deno_runtime.d.ts>Deno.env

Deprecated! UUID is part of the deno standard library
Latest
function Deno.env
import { Deno } from "https://deno.land/x/uuid@v0.1.2/lib/lib.deno_runtime.d.ts";
const { env } = Deno;

Returns a snapshot of the environment variables at invocation. Mutating a property in the object will set that variable in the environment for the process. The environment object will only accept strings as values.

  const myEnv = Deno.env();
  console.log(myEnv.SHELL);
  myEnv.TEST_VAR = "HELLO";
  const newEnv = Deno.env();
  console.log(myEnv.TEST_VAR == newEnv.TEST_VAR);

Returns

{ [index: string]: string; }