Helper function to parse the parameters and return them as an array
@param  {String}     the parameter string

@return {Array}      the keys and values for the parameters
425386
private function parseParameters($string) {

		$parameters      = array();
		$arrayParameters = array();
		$arrayOptions    = array();
		$betweenSQuotes  = false;
		$betweenDQuotes  = false;
		$inKey           = true;
		$inValue         = false;
		$inArray         = false;
		$inOption        = false;
		$char            = "";
		$buffer          = "";
		$keyBuffer       = "";
		$arrayKeyBuffer  = "";
		$strLength       = strlen($string);

		for ($i = 0; $i < $strLength; $i++) {

			$previousChar = $char;
			$char = $string[$i];

			if ($inKey && !$betweenDQuotes && !$betweenSQuotes && (($char == "\"") || ($char == "'"))) {
				// if inKey, a quote, and betweenQuotes is false ignore quote, set betweenQuotes to true and empty buffer to kill spaces
				($char == "\"") ? ($betweenDQuotes = true) : ($betweenSQuotes = true);
			} else if ($inKey && (($betweenDQuotes && ($char == "\"")) || ($betweenSQuotes && ($char == "'"))) && ($previousChar == "\\")) {
				// if inKey, a quote, betweenQuotes is true, and previous character is \ add to buffer
				$buffer   .= $char;
			} else if ($inKey && (($betweenDQuotes && ($char == "\"")) || ($betweenSQuotes && ($char == "'")))) {
				// if inKey, a quote, betweenQuotes is true set betweenQuotes to false, save as key buffer, empty buffer set inKey false
				$keyBuffer      = $buffer;
				$buffer         = "";
				$inKey          = false;
				$betweenSQuotes = false;
				$betweenDQuotes = false;
			} else if ($inKey && !$betweenDQuotes && !$betweenSQuotes && ($char == ":")) {
				// if inKey, a colon, betweenQuotes is false, save as key buffer, empty buffer, set inKey false set inValue true
				$keyBuffer = $buffer;
				$buffer    = "";
				$inKey     = false;
				$inValue   = true;
			} else if ($inKey) {
				// if inKey add to buffer
				$buffer   .= $char;
			} else if (!$inKey && !$inValue && ($char == ":")) {
				// if inKey is false, inValue false, and a colon set inValue true
				$inValue   = true;
			} else if ($inValue && !$inArray && !$betweenDQuotes && !$betweenSQuotes && ($char == "[")) {
				// if inValue, outside quotes, and find a bracket set inArray to true and add to array buffer
				$inArray        = true;
				$inValue        = false;
				$arrayKeyBuffer = trim($keyBuffer);
			} else if ($inArray && !$betweenDQuotes && !$betweenSQuotes && ($char == "]")) {
				// if inValue, outside quotes, and find a bracket set inArray to true and add to array buffer
				$inArray                     = false;
				$parameters[$arrayKeyBuffer] = $arrayParameters;
				$arrayParameters = array();
			} else if ($inArray && !$inOption && !$betweenDQuotes && !$betweenSQuotes && ($char == "{")) {
				$inOption = true;
				$inKey    = true;
			} else if ($inArray && $inOption && !$betweenDQuotes && !$betweenSQuotes && ($char == "}")) {
				$inOption = false;
				$inValue  = false;
				$inKey    = false;
				$arrayParameters[] = $arrayOptions;
				$arrayOptions = array();
			} else if ($inValue && !$betweenDQuotes && !$betweenSQuotes && (($char == "\"") || ($char == "'"))) {
				// if inValue, a quote, and betweenQuote is false set betweenQuotes to true and empty buffer to kill spaces
				($char == "\"") ? ($betweenDQuotes = true) : ($betweenSQuotes = true);
			} else if ($inValue && (($betweenDQuotes && ($char == "\"")) || ($betweenSQuotes && ($char == "'"))) && ($previousChar == "\\")) {
				// if inValue, a quote, betweenQuotes is true, and previous character is \ add to buffer
				$buffer   .= $char;
			} else if ($inValue && (($betweenDQuotes && ($char == "\"")) || ($betweenSQuotes && ($char == "'")))) {
				// if inValue, a quote, betweenQuotes is true set betweenQuotes to false, save to parameters array, empty buffer, set inValue false
				$buffer    = str_replace("\\\"","\"",$buffer);
				$buffer    = str_replace('\\\'','\'',$buffer);
				if ($inArray) {
					$arrayOptions[trim($keyBuffer)] = trim($buffer);
				} else {
					$parameters[trim($keyBuffer)] = trim($buffer);
				}
				$buffer         = "";
				$inValue        = false;
				$betweenSQuotes = false;
				$betweenDQuotes = false;
			} else if ($inValue && !$betweenDQuotes && !$betweenSQuotes && ($char == ",")) {
				// if inValue, a comman, betweenQuotes is false, save to parameters array, empty buffer, set inValue false, set inKey true
				if ($inArray) {
					$arrayOptions[trim($keyBuffer)] = trim($buffer);
				} else {
					$parameters[trim($keyBuffer)] = trim($buffer);
				}
				$buffer    = "";
				$inValue   = false;
				$inKey     = true;
			} else if ($inValue && (($i + 1) == $strLength)) {
				// if inValue and end of the string add to buffer, save to parameters array
				$buffer   .= $char;
				if ($inArray) {
					$arrayOptions[trim($keyBuffer)] = trim($buffer);
				} else {
					$parameters[trim($keyBuffer)] = trim($buffer);
				}
			} else if ($inValue) {
				// if inValue add to buffer
				$buffer   .= $char;
			} else if (!$inValue && !$inKey && ($char == ",")) {
				// if inValue is false, inKey false, and a comma set inKey true
				if ($inArray && !$inOption) {
					// don't do anything
				} else {
					$inKey = true;
				}

			}
		}

		return $parameters;

	}
817194
def extract_params(params):
    
    values = []
    if isinstance(params, dict):
        for key, value in params.items():
            values.extend(extract_params(value))
    elif isinstance(params, list):
        for value in params:
            values.extend(extract_params(value))
    else:
        values.append(params)
    return values
951396
function encodeParams(params) {
    var queryString;
    if (params && Object.keys(params)) {
        queryString = [].slice.call(arguments).reduce(function (a, b) {
            return a.concat(b instanceof Array ? b : [b]);
        }, []).filter(function (c) {
            return "object" === typeof c;
        }).reduce(function (p, c) {
            !(c instanceof Array) ? p = p.concat(Object.keys(c).map(function (key) {
                return [key, c[key]];
            })) : p.push(c);
            return p;
        }, []).reduce(function (p, c) {
            c.length === 2 ? p.push(c) : p = p.concat(c);
            return p;
        }, []).reduce(function (p, c) {
            c[1] instanceof Array ? c[1].forEach(function (v) {
                p.push([c[0], v]);
            }) : p.push(c);
            return p;
        }, []).map(function (c) {
            c[1] = encodeURIComponent(c[1]);
            return c.join("=");
        }).join("&");
    }
    return queryString;
}
935323
function parseKeyValue(/**string*/keyValue) {
  var obj = {}, key_value, key;
  forEach((keyValue || "").split('&'), function(keyValue) {
    if (keyValue) {
      key_value = keyValue.replace(/\+/g,'%20').split('=');
      key = tryDecodeURIComponent(key_value[0]);
      if (isDefined(key)) {
        var val = isDefined(key_value[1]) ? tryDecodeURIComponent(key_value[1]) : true;
        if (!hasOwnProperty.call(obj, key)) {
          obj[key] = val;
        } else if (isArray(obj[key])) {
          obj[key].push(val);
        } else {
          obj[key] = [obj[key],val];
        }
      }
    }
  });
  return obj;
}
788445
function () {
            var parameters = [];
            for (var i = 0; i < this.$parameters.length; i++) {
                var para = this.$parameters[i];
                if (para instanceof Binding) {
                    para = para.getValue();
                }
                parameters.push(para);
            }
            return parameters;
        }
1023597
function() {
  var args = Array.from(arguments)
  var url = _.get(args, '[0]', '')
  var params = _.get(args, '[1]', {})

  // if we specify all of the options as a param object, we're basically done
  // and we can skip all of the parameterization checks below
  if (_.isPlainObject(_.get(args, '[0]', {})))
  {
    params = _.get(args, '[0]', {})
  }
   else
  {
    params = _.assign({}, { url }, params)
  }

  return _.assign({}, params, { op: 'request' })
}
1353714
function parseParams (str) {
  var items
  var result = {}
  if (str && baseExports.isString(str)) {
    baseExports.each(str.split('&'), function (param) {
      items = param.split('=')
      result[decode(items[0])] = decode(items[1] || '')
    })
  }
  return result
}
845530
function(url){

	var retlist = [];

	// Pull parameters.
	var tmp = url.split('?');
	var path = '';
	var parms = [];
	if( ! tmp[1] ){ // catch bad url--nothing before '?'
	    parms = tmp[0].split('&');
	}else{ // normal structure
	    path = tmp[0];
	    parms = tmp[1].split('&');
	}

	// Decompose parameters.
	each(parms, function(p){
	    var c = _first_split('=', p);
	    if( ! c[0] && ! c[1] ){
		retlist.push([p]);
	    }else{
		retlist.push(c);		  
	    }
	});
	
	return retlist;
    }
1333824
function getUrlParameters() {
        var params = [ "allume" ];
        location.search.substr(1).split("&").forEach(function (part) {
            if (!part) return;
            var item = part.split("=");
            params.push(decodeURIComponent(item[0]));
        });
        return params;
    }
1274674
function getParams(optlist){
	var aliases = {};
	var known = {};
	
	Object.keys(optlist).forEach(function(key) {
		var short = optlist[key].short;
		if (short) {
			aliases[short] = '--' + key;
		}
		known[key] = optlist[key].type;
	});
	
	return {
		known: known,
		aliases: aliases
	}
}
821947
function () {
        var keys = Object.keys(this),
            i = -1,
            len = keys.length,
            values = [];

        while (++i < len) {
            values.push(this[keys[i]]);
        }

        return values;
    }
576303
function () {
		var result = [];
		var args = arguments;
		var l = args.length;
		var name, value;
		for (var i = 0; i < l; i++) {
			name = args[i];
			value = this.getValue(name);
			result.push(value);
		}
		return result;
	}
1076844
private function parseParameters(): array
    {
        $arguments = [];
        $options = [];
        $signatureArguments = $this->getParameters();

        foreach ($signatureArguments as $value) {
            $item = [];
            $matches = [];
            $exploded = explode(':', $value);

            if (count($exploded) > 0 && preg_match($this->argumentsMatcher, $exploded[0], $matches)) {
                $item['name'] = $matches[1];
                $item['type'] = $this->defineType($matches[2] === '[]', $matches[3] === '=');
                $item['default'] = $matches[4] !== '' ? $matches[4] : null;
                $item['description'] = count($exploded) === 2 ? $exploded[1] : null;

                if ($matches[2] === '[]' && $item['default'] !== null) {
                    $item['default'] = explode(',', $item['default']);
                }

                if (substr($exploded[0], 0, 2) === '--') {
                    $options[] = $item;
                } else {
                    $arguments[] = $item;
                }
            }
        }

        return [
            'arguments' => $arguments,
            'options' => $options,
        ];
    }
442312
function parse(args) {
  const cliArgs = [];
  const nodeArgs = [];

  for (const arg of args) {
    if (NODE_FLAGS.test(arg)) {
      nodeArgs.push(arg);
    } else {
      cliArgs.push(arg);
    }
  }

  return {
    cliArgs,
    nodeArgs
  };
}
808706
public function getParams(): array
    {
        $params = array();
        $args = $this->args;

        $params['apikey'] = $this->apiKey;

        $methods = Client::getMethods();

        foreach ($methods[$this->method] as $key => $paramName) {
            if (isset($args[$key])) {
                $params[$paramName] = $args[$key];
            }
        }

        return $params;
    }
80674
function parameterize(values, notSetValue) {
    if (typeof values === 'function') {
      return this.parameter(values);
    }
    values = Array.isArray(values) ? values : [values];
    var str = '',
        i = -1;
    while (++i < values.length) {
      if (i > 0) {
        str += ', ';
      }
      str += this.parameter(values[i] === undefined ? notSetValue : values[i]);
    }
    return str;
  }
1069213
function getNodeParameters() {
        return typeof process !== "undefined" && process.argv && process.argv.length > 1 ? process.argv.slice(1) : null;
    }