Norwegian Polka Music

    @donutteam/environment-variable-utilities

    1.0.2 • Public • Published

    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

    Install

    npm i @donutteam/environment-variable-utilities

    DownloadsWeekly Downloads

    4

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    4.24 kB

    Total Files

    5

    Last publish

    Collaborators

    • duckdotexe