portfolio/src/lib/createSlug.ts

3 lines
97 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, '-')
}