cal.pub0.org/lib/slugify.ts

6 lines
129 B
TypeScript
Raw Normal View History

2021-08-13 19:50:11 +00:00
export const slugify = (str: string) => {
return str.replace(/[^a-zA-Z0-9-]/g, "-").toLowerCase();
2021-08-13 19:50:11 +00:00
};
export default slugify;