Convert a string to a URL-safe slug.
Strips diacritics, lowercases, and replaces non-alphanumeric runs with -. Trailing/leading dashes are removed.
-
slugify('Hello, World!') // 'hello-world'slugify('Árvíztűrő tükörfúrógép') // 'arvizturo-tukorfurogep' Copy
slugify('Hello, World!') // 'hello-world'slugify('Árvíztűrő tükörfúrógép') // 'arvizturo-tukorfurogep'
Convert a string to a URL-safe slug.
Strips diacritics, lowercases, and replaces non-alphanumeric runs with
-. Trailing/leading dashes are removed.