This commit is contained in:
Jarek Krochmalski committed 2026-03-03 12:18:17 +01:00
1 parent a04040e1e9
commit bcd10c1407
2 files changed
+19 -12

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
/**
* Normalize a stack name to be valid (lowercase alphanumeric with hyphens/underscores)
*/
export function normalizeStackName(name: string): string {
return name
.toLowerCase()
.replace(/[^a-z0-9_-]/g, '-')
.replace(/-+/g, '-')
.replace(/^-|-$/g, '');
}