spee.ch/helpers/configVarCheck.js

18 lines
590 B
JavaScript
Raw Normal View History

2017-09-25 09:13:18 -07:00
const logger = require('winston');
2018-03-08 20:48:29 -08:00
module.exports = (config) => {
2017-09-25 09:31:26 -07:00
// get the config file
2017-11-06 15:18:45 -08:00
for (let configCategoryKey in config) {
if (config.hasOwnProperty(configCategoryKey)) {
// get the final variables for each config category
2017-11-06 15:18:45 -08:00
const configVariables = config[configCategoryKey];
2017-09-25 09:31:26 -07:00
for (let configVarKey in configVariables) {
if (configVariables.hasOwnProperty(configVarKey)) {
// print each variable
2017-09-25 09:31:26 -07:00
logger.debug(`CONFIG CHECK: ${configCategoryKey}.${configVarKey} === ${configVariables[configVarKey]}`);
}
2017-09-25 09:13:18 -07:00
}
}
}
};