13 lines
217 B
JavaScript
13 lines
217 B
JavaScript
const slugify = require('slugify')
|
|
|
|
const slugifyString = (str) => {
|
|
return slugify(str, {
|
|
replacement: '-',
|
|
remove: /[#,&,+()$~%.'":*?<>{}]/g,
|
|
lower: true,
|
|
})
|
|
}
|
|
|
|
module.exports = {
|
|
slugifyString,
|
|
}
|