Skip to main content

Function: makeUrl()

function makeUrl(urlParts: string | any[], query: Record<string, any>): string

Formats URL path

Parameters

ParameterTypeDescription
urlPartsstring | any[]parts of the path, will be separated by /
queryRecord<string, any>query parameters object

Returns

string

Formatted URL path

Example

makeUrl(["my", "path", 5], { name: "hello" })
// returns "/my/path/5?name=hello"

Defined in

src/lib/k8s/api/v2/makeUrl.ts:31