lewisdale.dev/config/utils.js

14 lines
258 B
JavaScript
Raw Normal View History

const slugify = require('slugify');
/** Converts string to a slug form. */
const slugifyString = str => {
return slugify(str, {
replacement: '-',
remove: /[#,&,+()$~%.'":*?<>{}]/g,
lower: true
});
};
module.exports = {
slugifyString
}