# urlParams

Helper functions setting, getting, updating and clearing query parameters in the URL-field.

#### getUrlParams() ⇨ `Object`

Get parameters from the URL-field.

**Returns**: `Object` - Parameters in URL-field.

```js
import { getUrlParams } from '@soleil-se/app-util/client';


const params = getUrlParams();
```

#### getUrlParam() ⇨ `String|Array[String]`

Get single parameter from the URL-field.

**Returns**: `String|Array[String]` - Parameter value.

```js
import { getUrlParam } from '@soleil-se/app-util/client';


const param = getUrlParam('name');
```

#### setUrlParams(params)

Set parameters in the URL-field, overwriting other parameters.

| Param  | Type     | Default | Description                                     |
| ------ | -------- | ------- | ----------------------------------------------- |
| params | `Object` |         | Object with parameters to set in the URL-field. |

```js
import { setUrlParams } from '@soleil-se/app-util/client';


setUrlParams({ foo: 'bar', arr: [1, 2] });
```

#### updateUrlParams(params)

Update parameters in the URL-field, merging with existing parameters

**Returns**: `String` - Stringified parameters.

| Param  | Type     | Default | Description                                     |
| ------ | -------- | ------- | ----------------------------------------------- |
| params | `Object` |         | Object with parameters to add to the URL-field. |

```js
import { updateUrlParams } from '@soleil-se/app-util/client';


updateUrlParams({ foo: 'bar', arr: [1, 2] });
```

#### clearUrlParams()

Clear parameters in the URL-field

```js
import { clearUrlParams } from '@soleil-se/app-util/client';


clearUrlParams();
```