env-var-fp

Functional utility for parsing env variables

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
env-var-fp
141.0.06 years ago7 years agoMinified + gzip package size for env-var-fp in KB

Readme

env-var-fp
Functional utility for parsing env variables

Usage

import { env, requires } from 'env-var-fp';
import { defaultTo } from 'lodash/fp';

// Throws exception
env(requires)('UNDEFINED_VAR')

// Returns 2
env(defaultTo('2'), parseFloat)('UNDEFINED_VAR')

License

MIT