Skip to content

Local901/js-env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

js-env

Quick way to get typed environment variables.

npm install @local901/env

How to use

import { Env } from "@local901/env";

export const config = {
    debug: Env.boolean("DEBUG", false); // optional
    apiKey: Env.string("API_KEY"); // required
    apiUrl: Env.url("API_URL", "http://localhost:8080"); // Get a URL object
}

About

Env utility functions

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors