feat(db): backfill slugs for existing non-Steam games
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
export function generateSlug(title: string): string {
|
||||
return title
|
||||
.toLowerCase()
|
||||
.replace(/[^a-z0-9]+/g, "-")
|
||||
.replace(/-+/g, "-")
|
||||
.replace(/^-|-$/g, "")
|
||||
.slice(0, 80)
|
||||
.replace(/-$/g, "")
|
||||
}
|
||||
Reference in New Issue
Block a user