1.0.2 • Published 8 months ago

@tsigel/get_env_prop v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months ago

Get env prop - package to get environment variables.

So that the code explicitly throws exceptions when there are no required variables for the service to work.

Example

import { get_env_prop, strict } from '@tsigel/get_env_prop';
import { pipe } from 'ramda';

export const PORT = get_env_prop('SERVER_PORT', pipe(strict, Number));
export const DATA_BASE_HOST = get_env_prop('DATA_BASE_HOST', strict);
1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago