(text: string)
| 10 | |
| 11 | // Native slugify implementation |
| 12 | function slugify(text: string): string { |
| 13 | return text |
| 14 | .toLowerCase() |
| 15 | .trim() |
| 16 | .replace(/[^\w\s-]/g, '') // Remove special characters |
| 17 | .replace(/[\s_-]+/g, '-') // Replace spaces and underscores with hyphens |
| 18 | .replace(/^-+|-+$/g, '') // Remove leading/trailing hyphens |
| 19 | } |
| 20 | |
| 21 | // Helper functions for date manipulation |
| 22 | function getWeekStart(date: Date): Date { |