title-slug

1.1.0 • Public • Published

title-slug

Generate a unique slug for a title.

The simple and best way to generate a unique slug for a title, to use it as URL.

Install

$ npm install title-slug

Usage

const titleSlug = require('title-slug');

titleSlug('hello world');
// hello-world-vup0jf

Even the same title will result in different slugs:

const titleSlug = require('title-slug');

titleSlug('hello world');
// hello-world-p8qml5

titleSlug('hello world');
// hello-world-da1v1q

titleSlug('hello world');
// hello-world-rq9p0c

//// THE GENERATED SLUG WILL BE IN LOWER CASE ////

titleSlug('HELLO world');
//hello-world-59dh3j

Donation

If you found this package useful consider supporting me.

"Buy Me A Coffee"

Package Sidebar

Install

npm i title-slug

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

1.71 kB

Total Files

3

Last publish

Collaborators

  • gugocharade