src/config.js
function create(basedir, defaults) {
    LOG.info("Initializing application configuration");
    var config = defaults || {};

    _loadConfigurationFiles(basedir, config);
    _validateConfig(config);

    if (config.DubBotBase.isConfigImmutable) {
        _freezeConfig(config);
        LOG.info("Configuration set up successfully. The config object is now frozen and no changes can be made to it.");
    }
    else {
        LOG.info("Configuration set up successfully. Config has not been frozen due to override of the DubBotBase.isConfigImmutable property.");
    }

    return config;
}
function create(basedir, defaults) {
    LOG.info("Initializing application configuration");
    var config = defaults || {};

    _loadConfigurationFiles(basedir, config);
    _validateConfig(config);

    if (config.DubBotBase.isConfigImmutable) {
        _freezeConfig(config);
        LOG.info("Configuration set up successfully. The config object is now frozen and no changes can be made to it.");
    }
    else {
        LOG.info("Configuration set up successfully. Config has not been frozen due to override of the DubBotBase.isConfigImmutable property.");
    }

    return config;
}
function create ( basedir , defaults ) { LOG . info ( "Initializing application configuration" ) ; var config = defaults || { } ; _loadConfigurationFiles ( basedir , config ) ; _validateConfig ( config ) ; if ( config . DubBotBase . isConfigImmutable ) { _freezeConfig ( config ) ; LOG . info ( "Configuration set up successfully. The config object is now frozen and no changes can be made to it." ) ; } else { LOG . info ( "Configuration set up successfully. Config has not been frozen due to override of the DubBotBase.isConfigImmutable property." ) ; } return config ; }
Initializes the application's configuration by reading from
a config file defined in NPM configuration.

@param {string} basedir - The base directory of the bot, containing a "config" subdirectory
@param {object} defaults - An optional object containing default configuration.
@returns {object} An object representing configuration
Initializes the application s configuration by reading from a config file defined in NPM configuration .