function getMergedValue(target, source) {
    if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
      return utils.merge(target, source);
    } else if (utils.isPlainObject(source)) {
      return utils.merge({}, source);
    } else if (utils.isArray(source)) {
      return source.slice();
    }
    return source;
  }
Config-specific merge-function which creates a new config-object
by merging two configuration objects together.

@param {Object} config1
@param {Object} config2
@returns {Object} New object resulting from merging config2 to config1