Skip to main content

Built and signed on GitHub Actions

Get environment variables in Deno, Bun and Node.js

This package works with Node.js, Deno, Bun
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
100%
Published
7 months ago (0.1.3)
function has
has(key: string): boolean

Verify if the environment variable exists

Examples

Example 1

import * as env from "jsr:@tsirysndr/env-js";
console.log(env.has("HOME")); // true

Parameters

Return Type

Add Package

deno add jsr:@tsirysndr/env-js

Import symbol

import { has } from "@tsirysndr/env-js";

---- OR ----

Import directly with a jsr specifier

import { has } from "jsr:@tsirysndr/env-js";

Add Package

npx jsr add @tsirysndr/env-js

Import symbol

import { has } from "@tsirysndr/env-js";

Add Package

yarn dlx jsr add @tsirysndr/env-js

Import symbol

import { has } from "@tsirysndr/env-js";

Add Package

pnpm dlx jsr add @tsirysndr/env-js

Import symbol

import { has } from "@tsirysndr/env-js";

Add Package

bunx jsr add @tsirysndr/env-js

Import symbol

import { has } from "@tsirysndr/env-js";