slugify

Converts a string into a URL-friendly `slug` by lowercasing it, removing special characters, and replacing spaces with hyphens.
> slugify(text: string): string
Parameters
  • str: The text to convert into a slug.
  • Returns: The `slugified` string.

Example

import { slugify } from "@explita/daily-toolset";

slugify("Hello World! How are you?"); // "hello-world-how-are-you"