code: function setPath(uri) {
    if (uri.path || (uri.pathname === undefined && uri.search === undefined)) return;
  
    uri.path = '';
    if (uri.pathname) uri.path += uri.pathname;
    if (uri.search) uri.path += uri.search;
  }
docs: construct path property