---
title: "UrlUtils | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/UrlUtils/"
---

# UrlUtils

> `string`

## Functions

### addUrlParameter()

```ts
function addUrlParameter(
   startUrl, 
   name, 
   value): string;
```

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `startUrl` | `string` |
| `name` | `string` |
| `value` | `string` |

#### Returns

***

### buildUrl()

```ts
function buildUrl(
   baseUrl, 
   endpoint, 
   endpointParams?, 
   queryParams?): any;
```

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `baseUrl` | `string` |
| `endpoint` | `string` |
| `endpointParams?` | \{ \[`name`: `string`\]: `string`; \} |
| `queryParams?` | \{ \[`name`: `string`\]: `string`; \} |

#### Returns

`any`

***

### getQueryParams()

```ts
function getQueryParams(url): Record<string, string | number>;
```

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `url` | `string` |

#### Returns

`Record`\<`string`, `string` \| `number`\>

***

### queryParamsChanged()

```ts
function queryParamsChanged(
   oldParams, 
   newParams, 
   ignoreKeys?): boolean;
```

#### Parameters

| Parameter | Type | Default value |
| ------ | ------ | ------ |
| `oldParams` | `Record`\<`string`, `string` \| `number`\> | `undefined` |
| `newParams` | `Record`\<`string`, `string` \| `number`\> | `undefined` |
| `ignoreKeys` | `string`[] | `[]` |

#### Returns

`boolean`

***

### shouldEncodeUrl()

```ts
function shouldEncodeUrl(url): boolean;
```

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `url` | `string` |

#### Returns

`boolean`
