Get the querystring of a URL parameters as a hash

@return {String}     A querystring from URL
420583
function() {
      var pairs = _self.querystring().split('&');
      var params = {};

      for(var i=0; i<pairs.length; i++) {
        if(pairs[i] === '') continue;
        var nameValue = pairs[i].split('=');
        params[nameValue[0]] = (typeof nameValue[1] === 'undefined' || nameValue[1] === '') ? true : decodeURIComponent(nameValue[1]);
      }

      return params;
    }
1056761
def hashify_query_string
      if request.query_string && request.query_string.length > 0
        redirect_to request.url.gsub('?', '#')
        return true
      end
      return false
    end
1257443
function(){
        var hashPos = window.location.href.indexOf('#');

        if (hashPos == -1) {
            return "";
        }

        var qPos = window.location.href.indexOf('?', hashPos);

        if (qPos != -1)
            return window.location.href.substr(qPos);

        return window.location.href.substr(hashPos);
        }
1338958
def http_build_query(params = {})
        params.collect do |k,v|
          "#{URI.encode(k.to_s)}=#{URI.encode(v.to_s)}" unless v.nil?
        end.compact.join('&')
      end
1314186
function getQueryString(url){
	if(url.indexOf('%')!==-1)  url = decodeURIComponent(url);
	return parse_info(url.substr(url.indexOf('?')+1,url.length-url.indexOf('?')-1));
}
579102
function () {
    var parts;

    if (!this.queryString) return;

    parts = this.queryString.replace('?','').split('&');

    each(parts, function (part) {
      var key = decodeURIComponent( part.split('=')[0] ),
          val = decodeURIComponent( part.split('=')[1] );

      if ( part.indexOf( '=' ) === -1 ) return;
      this._applyQueryParam( key, val );

    }, this);

  }
558834
def query_string(context, **kwargs):
    """"""
    params = context["request"].GET.copy()

    for key, value in list(kwargs.items()):
        params[key] = value

    return "?" + params.urlencode()
277080
function getCanonicalUrl(url) {
  // Trim the #fragment. We are unique to query string, though.
  var hashIndex = url.indexOf('#');
  if (hashIndex != -1) {
    url = url.substring(0, hashIndex);
  }
  return url;
}
694154
function() {
    var url = this.url;
    if (this.useHash) {
      url = addHash(url, this);
    }
    // if (this.useDomain) {
      if (!this.domain) {
        this.domain = getDomain(this.subpath);
      } else if (Array.isArray(this.domain)) {
        this.domain = getDomain(this.subpath, this.domain);
      }
      url = this.domain + url;
    // }

    return url + this.query;
  }
1125475
function getProtohost(url) {
  if (typeof url !== 'string' || url.length === 0 || url[0] === '/') {
    return undefined
  }

  var searchIndex = url.indexOf('?')
  var pathLength = searchIndex !== -1
    ? searchIndex
    : url.length
  var fqdnIndex = url.substr(0, pathLength).indexOf('://')

  return fqdnIndex !== -1
    ? url.substr(0, url.indexOf('/', 3 + fqdnIndex))
    : undefined
}
517032
def strip_querystring(url):
    """"""
    p = six.moves.urllib.parse.urlparse(url)
    return p.scheme + "://" + p.netloc + p.path
10274
def parse_url(url)
      s = url

      # remove entities
      s = HTML_ENTITIES.decode(s)

      # fix a couple of common encoding bugs
      s = s.gsub(' ', '%20')
      s = s.gsub("'", '%27')

      # append query manually (instead of letting HTTParty handle it) so we can
      # include it in cache_key
      query = options.delete(:query)
      if query.present?
        q = HTTParty::HashConversions.to_params(query)
        separator = s.include?('?') ? '&' : '?'
        s = "#{s}#{separator}#{q}"
      end

      URI.parse(s)
    end
71218
function buildQueryString(params) {
    var querystring = '';
    for(param in params) {
        querystring += '&' + param + '=' + params[param];
    }
    return querystring;
}
541335
function objectToQueryString(urlParams) {
  var queryString = '';
      
  if (urlParams) {
    Object.keys(urlParams).forEach(function (key) {
      if (queryString.length === 0) {
        queryString = '?';
      }
      else {
        queryString += '&';
      }
      
      queryString += key + '=' + encodeURIComponent(urlParams[key] || '');
    });
  }
  
  return queryString;
}
960912
function getQueryParams(params) {
        params = params || {};
        var url = $location.url();
        var idx = url.indexOf('?');

        // if there is a query string
        if (idx < 0) { return {}; }

        // get the query string and split the keyvals
        var query = url.substring(idx + 1);
        var keyVals = query.split('&');

        // put each key/val into the params object
        _.each(keyVals, function (keyVal) {
            var keyValArr = keyVal.split('=');
            params[keyValArr[0]] = keyValArr[1];
        });

        return params;
    }
437288
function parseUrlParams(params) {
    let qs = '';
    let i = 0;
    each(params, (val, key) => {
        if (i > 0) {
            qs += '&amp;';
        }
        qs += key + '=' + val;
        i += 1;
    })
    return qs;
}
1153286
function( url ) {
                var parsedUrl = this.parseUrl( url || location.href ),
                    uri = url ? parsedUrl : location,

                    // Make sure to parse the url or the location object for the hash because using
                    // location.hash is autodecoded in firefox, the rest of the url should be from
                    // the object (location unless we're testing) to avoid the inclusion of the
                    // authority
                    hash = parsedUrl.hash;

                // mimic the browser with an empty string when the hash is empty
                hash = hash === "#" ? "" : hash;

                return uri.protocol +
                    parsedUrl.doubleSlash +
                    uri.host +

                    // The pathname must start with a slash if there's a protocol, because you
                    // can't have a protocol followed by a relative path. Also, it's impossible to
                    // calculate absolute URLs from relative ones if the absolute one doesn't have
                    // a leading "/".
                    ( ( uri.protocol !== "" && uri.pathname.substring( 0, 1 ) !== "/" ) ?
                        "/" : "" ) +
                    uri.pathname +
                    uri.search +
                    hash;
            }