Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 303 Bytes

README.md

File metadata and controls

20 lines (13 loc) · 303 Bytes

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