Skip to content

Conversation

mfilenko
Copy link

@mfilenko mfilenko commented Mar 18, 2022

Hey,

First of all, thanks a load for your work! This package is awesome! It's extremely useful and the code is super easy to navigate and work with 🙌

I would like to add an option to treat empty strings as null values. A use case can be the following .env file that indicates that values must be set, i.e., "" is not a valid value:

$ cat .env.example
# Make sure the following variables are set
MY_ENV_VAR1=
MY_EVV_VAR2=

The ignoreEmpty option shines when it comes to usage in Kotlin, e.g.:

dotenv["MY_ENV_VAR1"] ?: throw ...

@cdimascio cdimascio self-requested a review March 27, 2022 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants