@siendoricardo/enver
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

Enver

Super minimalistic pre-processor por env vars.

Simply checks if the var is there and then parses it to a string, or a number (or return default).

Usage

import { Enver } from '@siendoricardo/enver';

// This will throw an error if the var is not set
Enver.getBoolean('VAR_NOT_EXISTS');

// This won't throw because the default value is returned
Enver.getBoolean('VAR_NOT_EXISTS', true);


// All available methods
Enver.get('MY_VAR'); // This return unkown
Enver.getString('MY_VAR', 'optional default value'); 
Enver.getNumber('MY_VAR');
Enver.getBoolean('MY_VAR');

Readme

Keywords

Package Sidebar

Install

npm i @siendoricardo/enver

Weekly Downloads

0

Version

1.1.0

License

ISC

Unpacked Size

16.7 kB

Total Files

10

Last publish

Collaborators

  • siendoricardo