getURIParams()function

getURIParams(params: PossibleURIParams, caller: AnyCaller = getURIParams): URIParams
ParamType
paramsPossibleURIParams
Possible URI params to convert. required
callerAnyCaller
Function to attribute a thrown error to (defaults to getURIParams itself). Defaults to getURIParams
Return
URIParams
Dictionary of string params keyed by name.
Throws
RequiredError
If params is a string or URL that cannot be converted to a valid URI.
ValueError
If any param value cannot be converted to a string.

Get a set of params for a URI as a dictionary.

  • Any params with undefined value will be ignored.
  • Returned dictionary has a null prototype, so an untrusted __proto__ param becomes an inert own entry (instead of being silently dropped by the inherited __proto__ setter).