0.2.0 • Published 5 years ago

@proc/configuration v0.2.0

Weekly downloads
7
License
MIT
Repository
-
Last release
5 years ago

typed configuration object

A Configuration Object. It uses a simple {[key:string]: string} source object (like process.env, encouraging 12-factor style configuration) and exposes methods for fetching strings, booleans, integers and floats, with fallbacks.

Works well with dotenv/register.

Usage

import { createConfig } from "@proc/configuration";

const config = createConfig(process.env);

console.log(config.getString("NODE_ENV", "development"));
console.log(config.getInteger("SOME_INTEGER", 123));
0.2.0

5 years ago

0.1.35

6 years ago

0.1.34

6 years ago

0.1.33

6 years ago

0.1.32

6 years ago

0.1.28

6 years ago