Skip to content

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@pi-team-mn/envkey

build status

Read an environment key or throw an error if it's not set

import { envkey } from '@pi-team-mn/envkey';

console.log(process.env.MY_ENV_KEY); // 'thevalue'
const MY_ENV_KEY_VALUE = envkey(MY_ENV_KEY);
console.log(MY_ENV_KEY_VALUE);  // 'thevalue'

console.log(process.env.NOT_SET); // undefined
const NOT_SET_VALUE = envkey(NOT_SET); // throws an error

About

Read environment keys or throw an error

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages