Namespace: Urls:urlParameters

Urls:urlParameters

Source:

Methods

urlParameters(urlopt) → {Object|null}

Searches for and returns parameters embedded in provided url with a parameter string.

Semantic shortcut version of urlParameter without any given parameter.

Parameters:
Name Type Attributes Default Description
url String | URL <optional>
null

the url containing the parameter string, will use current URL if nullish

Source:
See:
Throws:

error if given url is not usable

Returns:
dictionary object of all parameters or null if url has no parameters
Type
Object | null
Example
const allParams = urlParameters('http://www.foobar.com?foo=foo&bar=bar&bar=barbar&bar');
=> {foo : 'foo', bar : ['bar', 'barbar', true]}