title-slug
v1.1.0
Published
The simple and best way to generate a unique slug for a title, to use it as URL.
Downloads
6
Maintainers
Readme
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.