<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [sanitize](./x-components.sanitize.md)

## sanitize() function

Sanitize characters from a given string.

**Signature:**

```typescript
sanitize: (str: string) => string
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  str | string | The string to remove unwanted characters. |

**Returns:**

string

The string without the unwanted characters.

