Socket
Book a DemoInstallSign in
Socket

@donutteam/environment-variable-utilities

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@donutteam/environment-variable-utilities

A collection of various environment variable related utility functions.

unpublished
latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Environment Variable Utilities

A collection of various environment variable related utility functions.

This pairs great with the dotenv package.

Installation

Install the package with NPM:

npm install @donutteam/environment-variable-utilities

Usage

checkEnvironmentVariables

This function checks that each of the environment variables in the given array exists and returns whether or not they all exist.

import { checkEnvironmentVariables } from "@donutteam/environment-variable-utilities";

const variablesExist = checkEnvironmentVariables(
	[
		"PORT",

		"SOME_SECRET_API_KEY",
	]);

requireEnvironmentVariables

This function checks that each of the environment variables in the given array exists and terminates the process if any of them are missing.

This assures that the process will not run in unexpected ways due to a missing environment variable.

import { requireEnvironmentVariables } from "@donutteam/environment-variable-utilities";

requireEnvironmentVariables(
	[
		"PORT",

		"SOME_SECRET_API_KEY",
	]);

License

MIT

Keywords

environment

FAQs

Package last updated on 03 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.