Class: ParameterList

ParameterList

A class that holds query parameters.

Constructor

new ParameterList(paramListopt)

Initialize the list of parameters.
Parameters:
Name Type Attributes Description
paramList ParameterList <optional>
An option list of parameters to copy.
Source:

Members

params :Object

An object containing key-value pairs, each of which is a query parameter.
Type:
  • Object
Source:

Methods

addParameter(key, value, overwriteopt) → {this}

Add a parameter to the list.
Parameters:
Name Type Attributes Default Description
key string The name of the parameter.
value any The parameter value.
overwrite boolean <optional>
false By default, an exception will be raised if a parameter matching key already exists, and the value is different. If this flag is set to true, however, then parameters will be blindly overwritten.
Source:
Returns:
Type
this

addParameters(params, overwriteopt) → {this}

Add parameters to the list.
Parameters:
Name Type Attributes Default Description
params Object An object containing key-value pairs.
overwrite boolean <optional>
false Whether or not to blindly overwrite existing parameters.
Source:
Returns:
Type
this

createParameterName(key) → {string}

Create a parameter name by replacing all non-word characters with underscores and adding a unique ID at the end.
Parameters:
Name Type Description
key string The parameter key.
Source:
Returns:
The unique parameter name.
Type
string