swipe game with overlay

This commit is contained in:
2025-07-13 16:29:02 +02:00
parent f74eb98414
commit 6a818e9da5
10 changed files with 122 additions and 26 deletions

13
utils/fileNameParser.ts Normal file
View File

@@ -0,0 +1,13 @@
export const toTitleCaseWithSpaces = (input: string): string => {
return input
.replace(/[-_]/g, " ")
.split(" ")
.filter(Boolean)
.map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
.join(" ");
};
export const parseImageName = (fileName: string): string => {
// Extract the name without the extension
return fileName.split(".").slice(0, -1).join(".");
};