61 lines
No EOL
1.1 KiB
TypeScript
61 lines
No EOL
1.1 KiB
TypeScript
/**
|
|
* Convert string to a church
|
|
* @param s
|
|
*/
|
|
export const church = (s: string) : "anna" | "christophorus" | "richard" | "eduard" | "clara" | "joseph" | "franziskus" | "antonius" | "marien" | "maria" | "antoniusFrankenberg" | "johannesNepomuk" => {
|
|
const lower = s.toLowerCase()
|
|
|
|
|
|
// Berlin - Heilige drei Koenige
|
|
if (lower.includes("anna")) {
|
|
return "anna"
|
|
}
|
|
|
|
if (lower.includes("christophorus")) {
|
|
return "christophorus"
|
|
}
|
|
|
|
if (lower.includes("richard")) {
|
|
return "richard"
|
|
}
|
|
|
|
if (lower.includes("eduard")) {
|
|
return "eduard"
|
|
}
|
|
|
|
if (lower.includes("clara")) {
|
|
return "clara"
|
|
}
|
|
|
|
// Chemnitz
|
|
|
|
if (lower.includes("joseph")) {
|
|
return "joseph"
|
|
}
|
|
|
|
if (lower.includes("franziskus")) {
|
|
return "franziskus"
|
|
}
|
|
|
|
if (lower.includes("frankenberg")) {
|
|
return "antoniusFrankenberg"
|
|
}
|
|
|
|
if (lower.includes("antonius")) {
|
|
return "antonius"
|
|
}
|
|
|
|
if (lower.includes("marien")) {
|
|
return "marien"
|
|
}
|
|
|
|
if (lower.includes("maria")) {
|
|
return "maria"
|
|
}
|
|
|
|
if (lower.includes("johannes") || lower.includes("nepomuk")) {
|
|
return "johannesNepomuk"
|
|
}
|
|
|
|
return "clara";
|
|
} |