1.0.1 • Published 1 year ago

typescript-slugify v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

TypeScript Slugify

GitHub package.json version npm Downloads

TypeScript Slugify is a lightweight npm package that provides a simple function for converting strings into URL-friendly slugs.

Installation

You can install TypeScript Slugify via npm:

npm install typescript-slugify

or

yarn add typescript-slugify

Usage

import slugify from 'typescript-slugify';

const originalString = "Hello World!";
const slug = slugify(originalString);
console.log(slug); // Output: hello-world

API

slugify(input: string): string

This function takes a string input and returns a slugified version of it, making it suitable for URLs.

License

This project is licensed under the MIT License - see the LICENSE file for details.