bcfg
Config parser (used for bcoin).
Usage
const Config = require('bcfg');
const config = new Config('my-module', {
alias: {
'n': 'network'
}
});
config.inject({
some: 'user',
options: 'here'
});
config.load({
hash: true,
query: true,
env: true,
argv: true
});
config.open('my-config.conf');
console.log(config.str('username'));
console.log(config.str('password'));
console.log(config.uint('userid'));
console.log(config.float('percent'));
console.log(config.bool('initialize'));
Contribution and License Agreement
If you contribute code to this project, you are implicitly allowing your code
to be distributed under the MIT license. You are also implicitly verifying that
all code is your original work. </legalese>
License
- Copyright (c) 2017, Christopher Jeffrey (MIT License).
See LICENSE for more info.