https://github.com/pawsong/env-var-fp
Functional utility for parsing env variables
https://github.com/pawsong/env-var-fp
Last synced: 4 months ago
JSON representation
Functional utility for parsing env variables
- Host: GitHub
- URL: https://github.com/pawsong/env-var-fp
- Owner: pawsong
- Created: 2017-02-25T03:17:12.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-05-07T14:41:02.000Z (about 4 years ago)
- Last Synced: 2025-02-18T06:15:53.504Z (5 months ago)
- Language: TypeScript
- Size: 28.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# env-var-fp
Functional utility for parsing env variables
## Usage
```typescript
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