stuff and junk and things

This commit is contained in:
Kim Ravn Hansen
2025-09-05 17:57:09 +02:00
parent 8bcbdbfe35
commit 1720db9eb7
14 changed files with 460 additions and 333 deletions

View File

@@ -2,7 +2,10 @@ export function cleanName(s) {
if (typeof s !== "string") {
throw new Error("String expected, but got a ", typeof s);
}
return s.toLowerCase().replace(" ", "_").replace(/[^a-zA-Z0-9_]/, "_");
return s
.toLowerCase()
.replace(" ", "_")
.replace(/[^a-zA-Z0-9_]/, "_");
}
/**