simple-slugify-string
Install
With NPM:
npm i --save simple-slugify-string
With Yarn:
yarn add simple-slugify-string
Usage
import { slugify } from 'simple-slugify-string';
// or `var slugify = require('simple-slugify-string').slugify;`
var slug = slugify('Star Wars: Episode VIII - The Last Jedi'); // result will be 'star_wars_episode_viii_the_last_jedi'