code: function normalizeConfig( config ) {
      var isObject = _.isObject( config ) && !Array.isArray( config );
  
      var defaultConfig = {
          baseUrl: '.' + _path.posix.sep, //String
          paths:   {}, //Object
          deps:    [], //Array
          shim:    {} //Object
      };
  
      if( isObject ) {
          config = _.defaults( config, defaultConfig );
      } else {
          return defaultConfig;
      }
  
      //Normalize baseUrl
      if( typeof config.baseUrl === 'string' ) {
          config.baseUrl = _path.posix.normalize( toPosix( config.baseUrl ) );
      } else {
          config.baseUrl = defaultConfig.baseUrl;
      }
  
      //Make sure paths is an object
      if( !_.isObject( config.paths ) || Array.isArray( config.paths ) ) {
          config.paths = defaultConfig.paths;
      }
  
      //Make sure shim is an object
      if( !_.isObject( config.shim ) || Array.isArray( config.shim ) ) {
          config.shim = defaultConfig.shim;
      }
  
      //Normalize deps
      config.deps = parseDeps( config.deps, config.paths );
  
      //Normalize shims
      config.shim = _.chain( config.shim ).mapValues( function( shim ) {
          if( Array.isArray( shim ) ) {
              return {
                  deps: parseDeps( shim, config.paths )
              };
          } else if( _.isObject( shim ) && typeof shim.exports === 'string' ) {
              return {
                  deps:    parseDeps( shim.deps, config.paths ),
                  exports: shim.exports
              };
          }
      } ).omit( isNull ).value();
  
      //Normalize paths
      config.paths = _.chain( config.paths ).mapValues( function( p ) {
          if( typeof p === 'string' ) {
              return toPosix( p );
          }
      } ).omit( isNull ).value();
  
      return config;
  }
docs: /*
  This is pretty complicated.
  
  TODO: Explain this.