Text to Url Slug conversion tool
npm i duct-slug-convert
Add the duct-slug-convert package in the component you want to use after installation.
import slug from 'duct-slug-convert'
ready to use
Example 1
const convert = slug('String');
The value sent to the slug function is converted to a url and returned as a value.