<commit_before># confenv
Load configuration from environment variables.

Simple, easy, no deps.

## Why
This module is useful for all environment that requires that the configuration is loaded from environment.
But the environment variables aren't typed. And this means you must cast all values to the right type.

Using this module, your code is clean from any type casting.

## getConfigurationFrom
Take an object as parameter and return a `Conf` instance

## getConfigurationFromEnvironment
call getConfigurationFrom with `process.env` as parameter

## Conf class
There're two method types of Conf class: `getAs<Type>OrUndefined` and `getAs<Type>OrThrow`.

`<Type>` could be one of them:
 - String
 - Integer
 - Array
 - Boolean
 - Float

### getAs&lt;Type&gt;OrUndefined
Return `<Type>` or `undefined`

### getAs&lt;Type&gt;OrThrow
Return `<Type>` or throw a `TypeError`<commit_msg>Add travis and coveralls badges [skip ci]<commit_after># confenv
[![Build Status](https://travis-ci.org/allevo/confenv.svg?branch=master)](https://travis-ci.org/allevo/confenv)
[![Coverage Status](https://coveralls.io/repos/github/allevo/confenv/badge.svg?branch=master)](https://coveralls.io/github/allevo/confenv?branch=master)

Load configuration from environment variables.

Simple, easy, no deps.

## Why
This module is useful for all environment that requires that the configuration is loaded from environment.
But the environment variables aren't typed. And this means you must cast all values to the right type.

Using this module, your code is clean from any type casting.

## getConfigurationFrom
This function takes an object as parameter and return a `Configuration` instance

## getConfigurationFromEnvironment
This function calls getConfigurationFrom with `process.env` as parameter

## Configuration class
There're two method types of Configuration class: `getAs<Type>OrUndefined` and `getAs<Type>OrThrow`.

`<Type>` could be one of them:
 - String
 - Integer
 - Array
 - Boolean
 - Float

### getAs&lt;Type&gt;OrUndefined
Return `<Type>` or `undefined`

### getAs&lt;Type&gt;OrThrow
Return `<Type>` or throw a `TypeError`
{'fraction_non_alphanumeric': 0.0970325011775789, 'fraction_numerical': 0.0, 'mean_word_length': 5.284023668639053, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7260501', 'n_tokens_mistral': 608, 'n_tokens_neox': 591, 'n_words': 233}