!!!!!DEPRECATED >= 2.0.1
Given the name of a parameter search for it in req, req.query,
req.body, res.locals, app.locals.
778261
function lookupParameterOnReq(name, index, length) {
    return (req, res) => {
        if(req[name]) return req[name]
        if(req.query && req.query[name]) return req.query[name]
        if(req.body && req.body[name]) return req.body[name]
        if(res.locals && res.locals[name]) return res.locals[name]
        if(req.app.locals && req.app.locals[name]) return req.app.locals[name]
        /**
         * In this case there is not a matching property in Request object for
         * the given parameter name. 
         * We just accept it, if that is the last parameter of the method, in which 
         * case it should correspond to a callback.
         */
        if(index != (length - 1))
            throw new Error('Parameter ' + name + ' not found in Request object!!!' )

        return null
    }
}
516671
function queryParser( req, res, next ) {
	if ( !req.query ) {
		var val = parseUrl( req ).query;
		req.query = queryparse( val );
	}
	next();
}
1308493
function(methodName, args) {
        var method   = this.spec.methods[methodName];
        if (method.deprecated === true)
            console.warn('Method '+ methodName + ' is deprecated.')
        var callback = args.pop(); // callback is always at the end
        var middleware = args[0];
        var params   = null;
        var payload  = null;
        var index = 0;
        if (typeof middleware != 'function') {
            params = args[0];
            middleware = null;
        } else {
            params = args[1];
            index = 1;
        }
        if (args.length > 1) {
            payload = args[index + 1];
        } else {
            if (method.required_params.length == 0
                && method.optional_params.length == 0) {
                payload = args[index];
                params = null;
            }
        }
        if (this._isValidCall(method, callback, params, payload)) {
            var request = this._createRequest(method, params, payload);
            var middlewares = this.middlewares.slice(0);
            if (middleware !== null) middlewares.push({cond: function() { return true; }, fun: middleware});
            this._callRequestMiddlewares(middlewares, method, request, [], callback);
        }
    }
672824
function parseQueryParams(location) {
  var params = {};
  var query = unescape(location.search.substring(1));
  var vars = query.split('&');
  for (var i = 0; i < vars.length; i++) {
    var pair = vars[i].split('=');
    params[pair[0]] = pair[1];
  }
  return params;
}
1006851
function (query, string, exact) {
        if (typeof string !== 'string' || string === '') {
          return false;
        }
        if (exact) {
          return string.toLowerCase() === query.toLowerCase();
        }
        return string.toLowerCase().indexOf(query.toLowerCase()) !== -1;
      }
552255
def search_param(key)
      code, message, value = @server.call("searchParam", @caller_id, key)
      case code
      when 1
        return value
      when -1
        raise message
      else
        return false
      end
    end
679328
function (params, q) {
            q = q || new Query();

            if (params.sort) {
                this._parseSort(params.sort, q);
            }

            if (params.where) {
                this._parseCondition(params.where, q);
            }

            var undefined;
            if (params.limit !== undefined) {
                var limit = parseInt(params.limit, 10);
                if (!isNaN(limit)) {
                    q.limit(limit);
                }

            }

            if (params.offset !== undefined) {
                var offset = parseInt(params.offset, 10);
                if (!isNaN(offset)) {
                    q.offset(offset);
                }
            }

            return q;
        }
513661
function (query, params, stringifier) {
    if (!query || !query.length || !params) {
      return query;
    }
    if (!stringifier) {
      stringifier = function (a) {return a.toString()};
    }
    var parts = [];
    var isLiteral = false;
    var lastIndex = 0;
    var paramsCounter = 0;
    for (var i = 0; i < query.length; i++) {
      var char = query.charAt(i);
      if (char === "'" && query.charAt(i-1) !== '\\') {
        //opening or closing quotes in a literal value of the query
        isLiteral = !isLiteral;
      }
      if (!isLiteral && char === '?') {
        //is a placeholder
        parts.push(query.substring(lastIndex, i));
        parts.push(stringifier(params[paramsCounter++]));
        lastIndex = i+1;
      }
    }
    parts.push(query.substring(lastIndex));
    return parts.join('');
  }
2970
@Deprecated
    public static Part<String> param(String name, String value) {
        return text(name, value);
    }
911908
function deprecationInfo(feed,name,type,deprecated_since) {
// apparently there is also a 'guaranteed_until' attribute - not seen
	var result = '';
	var d = feed.deprecations.deprecated;
	if (d) {
		for (var i=0;i<d.length;i++) {
			if ((d[i].name == name) && (d[i].type == type)) {
				if ((!deprecated_since) && (d[i].deprecated_since)) {
					deprecated_since = d[i].deprecated_since;
				}
				if (d[i].replaced_by) {
					result = result + '-> ' + d[i].replaced_by;
				}
			}
		}
	}
	result = ' since ' + (deprecated_since ? deprecated_since : 'unknown')+' '+result;
	return result;
}
36220
function (params) {
        this.query = params.q !== undefined ? String(params.q) : defaultParams.query;
        this.page = params.p !== undefined ? parseInt(params.p, 10) : defaultParams.page;
        switch (params.s) {
          case 'name':
          case 'owner':
          case 'stars':
          case 'updated':
            this.sorting = params.s;
            break;
          default:
            this.sorting = defaultParams.sorting;
        }
        switch (params.o) {
          case 'asc':
          case 'desc':
            this.order = params.o;
            break;
          default:
            this.order = defaultParams.order;
        }
      }
136492
def query_param(name, field, required=False):
    
    parameter = build_parameter(field)
    parameter["name"] = name
    parameter["in"] = "query"
    parameter["required"] = False

    return swagger.QueryParameterSubSchema(**parameter)
1253986
function updateQueryStringParameter(uri, key, value) {
            var re = new RegExp("([?|&])" + key + "=.*?(&|#|$)", "i");

            if (uri.match(re)) {
                return uri.replace(re, '$1' + key + "=" + value + '$2');
            } else {
                var hash = '';

                if (uri.indexOf('#') !== -1) {
                    hash = uri.replace(/.*#/, '#');
                    uri = uri.replace(/#.*/, '');
                }

                var separator = uri.indexOf('?') !== -1 ? "&" : "?";
                return uri + separator + key + "=" + value + hash;
            }
        }
691705
def search_v1(self, q, resolve=False):
        
        params = self.__generate_params(locals())
        if resolve == False:
            del params['resolve']
        return self.__api_request('GET', '/api/v1/search', params)
954051
function handleQueryParameters(request, response, next) {
	if (args.query === true && Object.keys(request.query).length > 0) {
		request.path += '/' + Object.keys(request.query).join('_') + '.json';
	}
	return next();
}
201661
function(req) {
      if(!req || !req.url) return false;

      if(typeof(path) === 'string') {
        return (req.url).match(path) && ((req.url).match(path).index === 0);

      // RegExp
      } else {
        return (req.url).match(path) !== null;
      }
    }
1122899
function ( req, res, next ) {

    if ( req.body ) {
        trimStringProperties(req.body);
    }

    if ( req.params ) {
        trimStringProperties(req.params);
    }

    if ( req.query ) {
        trimStringProperties(req.query);
    }

    next();

}