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