1.0.6 • Published 5 years ago

@pi-team-mn/envkey v1.0.6

Weekly downloads
224
License
MIT
Repository
github
Last release
5 years ago

@pi-team-mn/envkey

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
1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago