TypeScript Slugify is a lightweight npm package that provides a simple function for converting strings into URL-friendly slugs.
You can install TypeScript Slugify via npm:
npm install typescript-slugify
or
yarn add typescript-slugify
import slugify from 'typescript-slugify';
const originalString = "Hello World!";
const slug = slugify(originalString);
console.log(slug); // Output: hello-world
This function takes a string input and returns a slugified version of it, making it suitable for URLs.
This project is licensed under the MIT License - see the LICENSE file for details.