Description
Summary
In #3945 we added some environment variable helpers to the commons packages. A community member @benjymoses provided feedback that some of them were unclear and could be improved.
For example we had a base helper to retrieve and cast boolean values from the environment, but we also had more specific helpers like getTruthyBooleanFromEnv
and getFalsyBooleanFromEnv
.
These two specifically represented a state rather than an actual value so at minimum they should've been called isTruthyBooleanFromEnv
and isFalsyBooleanFromEnv
since they returned whether the value was truth-y or fals-y rather than the actual value.
On top of that, they were redundant in the sense that the original getBooleanFromEnv
could've been extended to handle both regular false
/true
strings as well as additional values.
Why is this needed?
So that we can consolidate the implementations and disambiguate the meaning/behavior of these helpers.
Which area does this relate to?
No response
Solution
No response
Acknowledgment
- This request meets Powertools for AWS Lambda (TypeScript) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Python, Java, and .NET
Future readers
Please react with 👍 and your use case to help us understand customer demand.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status