9 lines
180 B
JavaScript
9 lines
180 B
JavaScript
import slugify from 'slugify'
|
|
|
|
export const slugifyString = (str) => {
|
|
return slugify(str, {
|
|
replacement: '-',
|
|
remove: /[#,&,+()$~%.'":*?<>{}]/g,
|
|
lower: true,
|
|
})
|
|
}
|