cal.pub0.org/packages/lib/slugify.ts

6 lines
129 B
TypeScript
Raw Permalink Normal View History

export const slugify = (str: string) => {
return str.replace(/[^a-zA-Z0-9-]/g, "-").toLowerCase();
};
export default slugify;