lewisdale.dev/config/utils.js

13 lines
255 B
JavaScript
Raw Normal View History

2024-10-06 11:36:54 +00:00
import slugify from 'slugify';
/** Converts string to a slug form. */
2024-10-06 11:36:54 +00:00
export const slugifyString = str => {
return slugify(str, {
replacement: '-',
remove: /[#,&,+()$~%.'":*?<>{}]/g,
lower: true
});
};
2024-10-06 11:36:54 +00:00
export default {
slugifyString
}