The query function is just a helper function to help extract query parameters from URLs. It uses the WHATWG URL API under the hood to extract the query parameters and convert it from a URLSearchParams to a JSON object.
If there are multiple query parameters with the same name, it will return an array instead of a string.
Usage
Simply call the query function inside of your handler.