@frytg/check-required-env@0.2.0Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
frytg/utilityCheck for the existence of a required environment variable
This package works with Node.js, Deno, BunIt is unknown whether this package works with Cloudflare Workers, Browsers




JSR Score
100%
Published
2 months ago (0.2.0)
Check a required environment variable
Simply check if a certain required environment variable is set. If not, throw an error and exit the process.
import { checkRequiredEnv } from '@frytg/check-required-env'; checkRequiredEnv('MY_IMPORTANT_ENV_VAR');
It uses the logger from @frytg/logger
to log the error and exit the process (with code 1).
Author
Created by @frytg / frytg.digital
License
Unlicense - also see unlicense.org
Built and signed on
View transparency logGitHub Actions
Add Package
deno add jsr:@frytg/check-required-env
Import symbol
import * as check_required_env from "@frytg/check-required-env";
---- OR ----
Import directly with a jsr specifier
import * as check_required_env from "jsr:@frytg/check-required-env";
Add Package
npx jsr add @frytg/check-required-env
Import symbol
import * as check_required_env from "@frytg/check-required-env";
Add Package
yarn dlx jsr add @frytg/check-required-env
Import symbol
import * as check_required_env from "@frytg/check-required-env";
Add Package
pnpm dlx jsr add @frytg/check-required-env
Import symbol
import * as check_required_env from "@frytg/check-required-env";
Add Package
bunx jsr add @frytg/check-required-env
Import symbol
import * as check_required_env from "@frytg/check-required-env";