URLSearchParams
The URLSearchParams interface defines utility methods to work with the query string of a URL.
Properties
Functions
The getAll() method of the URLSearchParams interface returns all the values associated with a given search parameter as an array.
The has() method of the URLSearchParams interface returns a boolean value that indicates whether the specified parameter is in the search parameters.
The set() method of the URLSearchParams interface sets the value associated with a given search parameter to the given value. If there were several matching values, this method deletes the others. If the search parameter doesn't exist, this method creates it.
The URLSearchParams.sort() method sorts all key/value pairs contained in this object in place and returns undefined. Key/value pairs are sorted by the values of the UTF-16 code units of the keys. This method uses a stable sorting algorithm (i.e., the relative order between key/value pairs with equal keys will be preserved).