Delete a query (and its value) in a URL
If a query appears multiple times (which is a bit odd), all instances are removed
the URL to act on
the query to delete
the modified URL
May be either an absolute or a relative URL.
The URL the absolute URL should be relative to. This is usually the URL of the current page.
Get a suitable default filename for a given URL
If the URL:
the URL to make a filename for
the filename according to the above rules
Get the parent of the current URL. Parent is determined as:
the URL to get the parent of
removal option. Boolean properties: trailingSlash, ignoreFragment and ignoreSearch. Regular Expression properties: ignorePathRegExp. All properties are optional.
how many "generations" you wish to go back (1 = parent, 2 = grandparent, etc.)
the parent of the URL, or null if there is no parent
Get the root of a URL
the url to find the root of
the root of the URL, or the original URL when the URL isn't suitable for finding the root of.
Graft a new path onto some parent of the current URL
E.g. grafting "by-name/foobar" onto the 2nd parent path: example.com/items/by-id/42 -> example.com/items/by-name/foobar
the URL to modify
the new "grafted" URL path tail
the graft point in terms of path levels >= 0: start at / and count right <0: start at the current path and count left
Increment the last number in a URL.
(perhaps this could be made so you can select the "nth" number in a URL rather than just the last one?)
the URL to increment
increment step to advance by (can be negative)
the incremented URL, or null if cannot be incremented
Interpolates a query or other search item into a URL
If the URL pattern contains "%s", the query is interpolated there. If not, it is appended to the end of the pattern.
The search item is percent encoded before it is inserted.
a URL to interpolate/append a query to
a query to interpolate/append into the URL
the URL with the query encoded and inserted at the relevant point
Replace the value of a query in a URL with a new one
the URL to act on
the query key to replace the value for
the new value to use
Convert a URL matching a configured search URL back to command arguments.
Sets the value of a query in a URL with a specific one
the URL to act on
the query key to set the value for
the value to use
URL handling utlity functions