Slugifi
is small package for creating a slug from a string.
You can now remove special characters from string by enabling specialChars property from the options.
Npm :
$ npm install slugifi
Yarn :
$ yarn add slugifi
Pnpm :
$ pnpm add slugifi
ES6 :
import slugifi from 'slugifi';
slugifi('Random text'); // Outputs: random-text
CommonJS :
const slugifi = require('slugifi');
slugifi('Random text'); // Outputs: random-text
slugifi('some text', {
separator: '_', // defaults to '-'
capitalize: true, // defaults to false
specialChars: false, // defaults to true
});