feat: implement tag creation functionality with validation and routing

This commit is contained in:
fredy.siswanto
2025-03-07 19:31:37 +07:00
parent c91fe48eb9
commit 2b5c3b1111
6 changed files with 223 additions and 7 deletions
+8
View File
@@ -9,3 +9,11 @@ export const formatDate = (isoDate: string): string => {
year: 'numeric',
}).format(date)
}
export const urlFriendlyCode = (input: string) => {
return input
.trim()
.toLowerCase()
.replaceAll(/\s+/g, '-')
.replaceAll(/[^\w-]+/g, '')
}