Url updater
- Source:
- Since:
- 0.1.18
Methods
(inner) commitBrowserURLUpdate(url, is_popstate_update)
- Source:
Updates current path in browser
Parameters:
Name | Type | Description |
---|---|---|
url |
string | new path to set |
is_popstate_update |
boolean | whether or not to override the back button |
(inner) replaceUrlParam(url, param_name, param_value) → {string}
- Source:
Replace query param
Parameters:
Name | Type | Description |
---|---|---|
url |
string | url to update |
param_name |
string | |
param_value |
string |
Returns:
updated string
- Type
- string
(inner) updateURL(arr_params)
- Source:
Abstraction to make testing easier,
Parameters:
Name | Type | Description |
---|---|---|
arr_params |
array | containing structs with params to update {name: x, value: y} |
(inner) updateURLParams(url, arr_params) → {struct}
- Source:
Iterates over provided params and updates if replacement value found, new params are ignored
Parameters:
Name | Type | Description |
---|---|---|
url |
string | url to update |
arr_params |
array | containing structs with params to update {name: x, value: y} |
Returns:
update configuration for the commit {path: ,is_popstate_update: bool}
- Type
- struct