Transform string into slug. Replaces spaces and special characters.
npm install slugification
var slugify = require('slugification');
slugify('What is this?')
// => 'What-is-this'
- str: String to be transformed.
- spaceReplacement: String or character to replace spaces with. Defaults to
'-'
. - specialCharReplacement: String or character to replace special characters with.
Defaults to
''
.
npm install -g mocha
Then
npm test
MIT