typescript-slugify
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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.

Package Sidebar

Install

npm i typescript-slugify

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

3.05 kB

Total Files

5

Last publish

Collaborators

  • code-parth