lib/index.js
function defaultConfiguration(config) {
  config = _.defaults({}, config, {
    name: 'Sparky',
    endpoint: '/relay',
    convos: [],
    sending_address: config.address,
    inbound_address: config.address,
    transport: 'sparkpost',
    restrict_inbound: true,
    logger: 'verbose',
    size_limit: '50mb'
  });

  config.address = cleanAddress(config.address);
  config.sending_address = cleanAddress(config.sending_address);
  config.inbound_address = cleanAddress(config.inbound_address);

  config.logger = _.isString(config.logger) ? require('./logger')(config.logger) : config.logger;

  return config;
}
function defaultConfiguration(config) {
  config = _.defaults({}, config, {
    name: 'Sparky',
    endpoint: '/relay',
    convos: [],
    sending_address: config.address,
    inbound_address: config.address,
    transport: 'sparkpost',
    restrict_inbound: true,
    logger: 'verbose',
    size_limit: '50mb'
  });

  config.address = cleanAddress(config.address);
  config.sending_address = cleanAddress(config.sending_address);
  config.inbound_address = cleanAddress(config.inbound_address);

  config.logger = _.isString(config.logger) ? require('./logger')(config.logger) : config.logger;

  return config;
}
function defaultConfiguration ( config ) { config = _ . defaults ( { } , config , { name : 'Sparky' , endpoint : '/relay' , convos : [ ] , sending_address : config . address , inbound_address : config . address , transport : 'sparkpost' , restrict_inbound : true , logger : 'verbose' , size_limit : '50mb' } ) ; config . address = cleanAddress ( config . address ) ; config . sending_address = cleanAddress ( config . sending_address ) ; config . inbound_address = cleanAddress ( config . inbound_address ) ; config . logger = _ . isString ( config . logger ) ? require ( './logger' ) ( config . logger ) : config . logger ; return config ; }
generate the config

@param {Object} config - the given config
@returns {Configuration} config
generate the config