Skip to main content

Built and signed on GitHub Actions

Check 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
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
It is unknown whether this package works with Browsers
JSR Score
100%
Published
2 months ago (0.2.0)

Check a required environment variable

JSR @frytg/check-required-env ci

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
GitHub Actions
View transparency log

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";