@eroyeroy/utils - v0.1.0
    Preparing search index...

    Function slugify

    • Converts a string to a URL-friendly slug. Lowercases, removes diacritics, strips non-word characters, and replaces spaces with hyphens.

      Parameters

      • str: string

        The input string.

      Returns string

      slugify("Hello, World!") // => "hello-world"
      slugify(" Foo Bar ") // => "foo-bar"