As I cannot find [an NPM package for SEO-friendly slugify](https://www.npmjs.com/search?q=seo+friendly+url) where the url should not contain a certain word, so I created this package.
npm install seo-friendly-slugifyAs I cannot find an NPM package for SEO-friendly slugify where the url should not contain a certain word, so I created this package.
This package, by default, strips certain words, replace punctuations, and shorten the string. Also works with Unicode characters, as can be seen here.
By default, this package does not unidecode. You will have to extend it.
This package produces an empty string sometimes, and does not ensure uniqueness of ID. You might concatenate with nanoid or Date
For more of why, see
``javascript`
import Slugify from 'seo-friendly-slugify'
const s = new Slugify()
console.log(s.slugify(UGLY_STRING))
Due to unpkg, this works
`txt`
unpkg.com/seo-friendly-slugify@:version/umd/index.min.js
I wrote a topic about this, here.
Simply, yarn add seo-friendly-slugify`