Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pawsong/env-var-fp
Functional utility for parsing env variables
https://github.com/pawsong/env-var-fp
Last synced: about 5 hours 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 7 years ago)
- Default Branch: master
- Last Pushed: 2021-05-07T14:41:02.000Z (over 3 years ago)
- Last Synced: 2024-10-12T21:58:34.365Z (about 1 month 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