-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optional values #37
Comments
SGTM. If @af wants it, I can send a PR for it |
Rather than add a new option, I think it'd be better to support setting |
I like that better. Supporting null would also be helpful depending on the context.
|
We can't detect if |
(we could do |
|
You could use |
Yeah I was thinking about |
^ the commit above is a stab at how I was thinking this would work. It fails a test, plus I want to add new test(s) to cover the new use case, so it's not ready for prime-time yet. Could someone take a look and let me know if there's anything obviously wrong with this approach? |
It looks fine to me 🙂 |
I would like to validate an environment variable, but allow it to optionally be undefined. I know I can do something like this:
However, it seems more precise to have the value of
MY_AWESOME_VARIABLE
beundefined
(since it's not defined). Is there a way to achieve this with Envalid? Something like this would be great:Thanks!
The text was updated successfully, but these errors were encountered: