Consider the following:
const Config = require('@logdna/env-config')
const config = new Config([
Config.string('loglevel').default('info')
, Config.number('port').default(3000)
])
const foo = 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.