URL
Query string and path helpers.
queryStringToObject
Parse a query string into an object.
Tip
The input should be a bare query string. When reading from location.search, strip the leading ? first: queryStringToObject(location.search.slice(1)).
objectToQueryString
Serialize an object into a query string.
basename
Extract the last portion of a path, optionally stripping a suffix.
convertParamsRouterToRegExp
Convert a route pattern with :params into a RegExp.
Demo
Edit the query string / path and watch the conversions:
Loading...
