An open API service indexing awesome lists of open source software.

https://github.com/code-parth/typescript-slugify

typescript-slugify is a lightweight npm package that provides a simple function for converting strings into URL-friendly slugs. Written in TypeScript, this utility offers easy integration and efficient string processing, making it ideal for web development projects.
https://github.com/code-parth/typescript-slugify

npm-package slugify string-processing text-processing typescript typescript-slugify url utility

Last synced: 10 months ago
JSON representation

typescript-slugify is a lightweight npm package that provides a simple function for converting strings into URL-friendly slugs. Written in TypeScript, this utility offers easy integration and efficient string processing, making it ideal for web development projects.

Awesome Lists containing this project

README

          

# TypeScript Slugify

![GitHub package.json version](https://img.shields.io/github/package-json/v/code-parth/typescript-slugify)

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:

```bash
npm install typescript-slugify
```
or
```bash
yarn add typescript-slugify
```

## Usage

```javascript
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](LICENSE) file for details.