code: function parseUrl(url) {
      var parts = url.match(/^(.*?)(?:\?(.*))?$/);
      return {
          base: parts[1],
          params: getParams(parts[2] || ''),
      };
  }
docs: URL Processing 
  @param {string} url
  @return {{base: string, params: string}}