code: function urlConfig (url) {
          var config = {
              path: true,
              query: true,
              hash: true
          };
  
          if (!url) {
              return config;
          }
  
          if (RX_PROTOCOL.test(url)) {
              config.protocol = true;
              config.host = true;
  
              if (RX_PORT.test(url)) {
                  config.port = true;
              }
  
              if (RX_CREDS.test(url)) {
                  config.user = true;
                  config.pass = true;
              }
          }
  
          return config;
      }
docs: configure given url options