divulge
v2.0.2
Published
A simplified environment expander
Downloads
18
Maintainers
Readme
divulge
This module provides a function to override default configuration [recursively] with their equivalent non-delimited uppercase names, assuming they exist in the environment.
Example
var divulge = require('divulge')
var config = divulge({
port: 8000,
secret: {
user: "",
pass: ""
}
}, '', process.env)
// ...
console.log(config.port, config.secret.user, config.secret.pass)
When executed with PORT=5000 SECRETUSER='foo' SECRETPASS='bar'
in the environment, the above program will print 5000 foo bar
to the console.
License
This library is free and open-source software released under the MIT license.