Skip to main content
Module

x/denoversion/lib/lib.deno_runtime.d.ts>deno.env

Deno cli to manage and bump release versions.
Latest
function deno.env
import { deno } from "https://deno.land/x/denoversion@v1.0.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.

  import { env } from "deno";

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

Returns

{ [index: string]: string; }