You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constConfig=require('@logdna/env-config')constconfig=newConfig([Config.string('loglevel').default('info'),Config.number('port').default(3000)])constfoo=config.get('something-else')// happily returns undefined// do something important with foo...
Rather than just silently failing in this case (e.g. a typo in the config name, or you just forgot to add it...) we should throw an error.
While there may be valid use cases for "dynamic" configuration in which the properties are expected to be (potentially) unknown, the default behavior should be more strict.
The text was updated successfully, but these errors were encountered:
Consider the following:
Rather than just silently failing in this case (e.g. a typo in the config name, or you just forgot to add it...) we should throw an error.
While there may be valid use cases for "dynamic" configuration in which the properties are expected to be (potentially) unknown, the default behavior should be more strict.
The text was updated successfully, but these errors were encountered: