Skip to main content

slugify

Converts a string into a slug for URL usage.

Parameters

  • string string to convert to slug

Examples

slugify('The quick brown fox');
// => 'the-quick-brown-fox'

slugify('A. more-Complicated string!..');
// => 'a-more-complicated-string'

slugify('wïth speciäl chærs');
// => 'with-special-chars'

Returns string slug version of the string.

Meta

  • version: 2.1.0