init import projet

This commit is contained in:
2026-05-03 21:58:59 +02:00
parent f3756fdf8d
commit 8d3df9bbbb
179 changed files with 37694 additions and 132 deletions
@@ -0,0 +1,27 @@
export type PredictionTheme = "boy" | "girl";
function normalizeText(value: string) {
return value
.trim()
.toLowerCase()
.normalize("NFD")
.replace(/[\u0300-\u036f]/g, "");
}
export function getThemeFromSexValue(value: string | null | undefined): PredictionTheme | null {
if (!value) {
return null;
}
const normalized = normalizeText(value);
if (normalized === "fille" || normalized === "girl") {
return "girl";
}
if (normalized === "garcon" || normalized === "boy") {
return "boy";
}
return null;
}