Skip to main content
method Deno.Env.has
allow-env
Env.has(key: string): boolean
Deprecated

Check whether an environment variable is present or not.

Deno.env.set("SOME_VAR", "Value");
Deno.env.has("SOME_VAR");  // outputs true

Requires allow-env permission.

Parameters

key: string

Return Type

boolean
Back to top