2024-09-26 16:14:57 +02:00

10 lines
216 B
TypeScript

export const stringToSlug = (str: string) => {
return str
.toLowerCase()
.replace(/ /g, '-')
.replace(/[^\w-]+/g, '')
}
export const lowerString = (str: string) => {
return str.trim().toLowerCase()
}