• Converts a string to a URL-friendly slug.

    Parameters

    • str: string

      The string to convert to a slug.

    Returns string

    A URL-friendly slug string.

    Example

    slugify("Hello World!"); // Returns: "hello-world"
    slugify("This is a Test String"); // Returns: "this-is-a-test-string"
    slugify("Special@#$%Characters"); // Returns: "special-characters"
    slugify("Multiple Spaces"); // Returns: "multiple-spaces"

Generated using TypeDoc