Function: makeUrl()
function makeUrl(urlParts: string | any[], query: Record<string, any>): string
Formats URL path
Parameters
Parameter | Type | Description |
---|---|---|
urlParts | string | any [] | parts of the path, will be separated by / |
query | Record <string , any > | query parameters object |
Returns
string
Formatted URL path
Example
makeUrl(["my", "path", 5], { name: "hello" })
// returns "/my/path/5?name=hello"