code: function mixConfig(target, source, skipArrays) {
          var prop, value, isArray, targetValue;
  
          for (prop in source) {
              if (hasProp(source, prop)) {
                  //If the value of the property is a plain object, then
                  //allow a one-level-deep mixing of it.
                  value = source[prop];
                  isArray = lang.isArray(value);
                  if (typeof value === 'object' && value &&
                          !isArray && !lang.isFunction(value) &&
                          !lang.isRegExp(value)) {
  
                      // TODO: need to generalize this work, maybe also reuse
                      // the work done in requirejs configure, perhaps move to
                      // just a deep copy/merge overall. However, given the
                      // amount of observable change, wait for a dot release.
                      // This change is in relation to #645
                      if (prop === 'map') {
                          if (!target.map) {
                              target.map = {};
                          }
                          lang.deepMix(target.map, source.map);
                      } else {
                          target[prop] = lang.mixin({}, target[prop], value, true);
                      }
                  } else if (isArray) {
                      if (!skipArrays) {
                          // Some config, like packages, are arrays. For those,
                          // just merge the results.
                          targetValue = target[prop];
                          if (lang.isArray(targetValue)) {
                              target[prop] = targetValue.concat(value);
                          } else {
                              target[prop] = value;
                          }
                      }
                  } else {
                      target[prop] = value;
                  }
              }
          }
  
          //Set up log level since it can affect if errors are thrown
          //or caught and passed to errbacks while doing config setup.
          if (lang.hasProp(target, 'logLevel')) {
              logger.logLevel(target.logLevel);
          }
      }
docs: Mixes additional source config into target config, and merges some
  nested config, like paths, correctly.