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 get
get(key: string): string | undefined

Get the environment variable value

Examples

Example 1

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

Parameters

Return Type

string | undefined

Add Package

deno add @tsirysndr/env-js

Import symbol

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

---- OR ----

Import directly with a jsr specifier

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

Add Package

npx jsr add @tsirysndr/env-js

Import symbol

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

Add Package

yarn dlx jsr add @tsirysndr/env-js

Import symbol

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

Add Package

pnpm dlx jsr add @tsirysndr/env-js

Import symbol

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

Add Package

bunx jsr add @tsirysndr/env-js

Import symbol

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