# slugify

Source: https://pakdatakit.dev/api/typescript/text/functions/slugify/

```ts
function slugify(input, options?): string;
```

Defined in: [text.ts:156](https://github.com/chmuzamil/pakdatakit/blob/a6eeaa47381308c4e4fcda45b29642fe4fbfb1fc/src/text.ts#L156)

Turns text into a URL slug: lower-case words joined by `-`.

Urdu letters are kept as they are (no transliteration: Urdu does not write
short vowels, so there is no single Roman spelling). Diacritics, tatweel
and zero-width characters are dropped, the Arabic look-alikes ك ي ى become
the Urdu ک ی ی, Urdu and Arabic-Indic digits become `0-9`, and accented
Latin-1 letters lose their accents (`é` → `e`, `ß` → `ss`). Anything else
separates words.

## Parameters

| Parameter | Type |
| :------ | :------ |
| `input` | `string` |
| `options?` | [`SlugifyOptions`](https://pakdatakit.dev/api/typescript/text/interfaces/slugifyoptions/) |

## Returns

`string`

The slug, or `''` when nothing is left (or the input is not a
  string). Never throws.

## Example

```ts
slugify('Lahore Fort, 2024'); // "lahore-fort-2024"
slugify('لاہور قلعہ'); // "لاہور-قلعہ"
slugify('لاہور Fort', { script: 'latin' }); // "fort"
slugify('کراچی ۲۰۲۴', { script: 'urdu' }); // "کراچی-2024"
```
