Tweakr
    Preparing search index...

    Function slugify

    • Converts a string into a URL-friendly "slug".

      Parameters

      • str: string

        The input string to convert.

      Returns string

      The slugified version of the string, lowercase with words separated by hyphens and special characters removed.

      1.1.0

      slugify("Hello World!"); // "hello-world"
      slugify(" Some_text_here "); // "some-text-here"
      slugify("Café & Restaurant"); // "café-restaurant"