The base path to which the query string will be appended.
An object containing key-value pairs to be included in the query string. Values can be strings, numbers, or booleans.
OptionalsearchParams: null | URLSearchParamsOptional. An existing URLSearchParams object to merge with the new parameters.
Optionalencode: booleanOptional. If true, encodes the query string values.
The path with the query string appended. If no parameters are provided, returns the original currentPath.
Creates a new path with query string parameters appended.
This function generates a query string from the provided
paramsobject and optionally merges it with existingsearchParams. The resulting query string is appended to thecurrentPath. IfcurrentPathalready contains a query string, the new parameters are appended using&.