url.getUri() | Get full URI | https://example.come/some-path?x1=b#foo |
url.getPath() | Get path | /some-path |
url.getQuery() | Get query | x1=b |
url.getFragment() | Get fragment | foo , undefined |
url.getDomain() | Get domain | example.com |
url.getProtocol() | Get protocol | https |
url.get("x1") | Get value of x1 | b |
url.set("x1", "c").getUri() | Set value of x1 to c and get new uri. | https://example.come/some-path?x1=c#foo |
url.set("x1", ["c", "d"]).getQuery() | Set value of x1 and get new query. | x1=c&x1=d |
url.add("x1", ["e"]) | If x1 already has some value, add one more value. Otherwise just set x1 to e | url object to chain more methods. |
url.set("x1") | Set x1 value to undefined . Does same as url.remove("x1") | url object to chain more methods. |
url.remove("x1") | Remove x1 value if there is any. | url object to chain more methods. |
url.removeQuery() | Remove query from URI | url object to chain more methods. |
url.removeFragment() | Remove fragment from URI | url object to chain more methods. |
url.removePath() | Remove path from URI | url object to chain more methods. |
url.push() | Set URI at browser's address input and push history event to browser's history | undefined |
url.replace() | Set URI at browser's address input and replace current history event with new at browser's history | undefined |