portfolio/lib/createSlug.ts

3 lines
101 B
TypeScript
Raw Normal View History

2023-01-17 21:24:16 +00:00
export function createSlug(title: string) {
return title.toLowerCase().replace(/[.,\s]+/g, '-')
2023-01-17 21:24:16 +00:00
}