code: function getHost(name, opts) {
  
    // encode db name if opts.prefix is a url (#5574)
    if (hasUrlPrefix(opts)) {
      var dbName = opts.name.substr(opts.prefix.length);
      name = opts.prefix + encodeURIComponent(dbName);
    }
  
    // Prase the URI into all its little bits
    var uri = pouchdbUtils.parseUri(name);
  
    // Store the user and password as a separate auth object
    if (uri.user || uri.password) {
      uri.auth = {username: uri.user, password: uri.password};
    }
  
    // Split the path part of the URI into parts using '/' as the delimiter
    // after removing any leading '/' and any trailing '/'
    var parts = uri.path.replace(/(^\/|\/$)/g, '').split('/');
  
    // Store the first part as the database name and remove it from the parts
    // array
    uri.db = parts.pop();
    // Prevent double encoding of URI component
    if (uri.db.indexOf('%') === -1) {
      uri.db = encodeURIComponent(uri.db);
    }
  
    // Restore the path by joining all the remaining parts (all the parts
    // except for the database name) with '/'s
    uri.path = parts.join('/');
  
    return uri;
  }
docs: Get all the information you possibly can about the URI given by name and return it as a suitable object.