28 lines
No EOL
524 B
TypeScript
28 lines
No EOL
524 B
TypeScript
/**
|
|
* Convert string to a church
|
|
* @param s
|
|
*/
|
|
export const church = (s: string) : "anna" | "christophorus" | "richard" | "eduard" | "clara" => {
|
|
|
|
if (s.toLowerCase().includes("anna")) {
|
|
return "anna"
|
|
}
|
|
|
|
if (s.toLowerCase().includes("christophorus")) {
|
|
return "christophorus"
|
|
}
|
|
|
|
if (s.toLowerCase().includes("richard")) {
|
|
return "richard"
|
|
}
|
|
|
|
if (s.toLowerCase().includes("eduard")) {
|
|
return "eduard"
|
|
}
|
|
|
|
if (s.toLowerCase().includes("clara")) {
|
|
return "clara"
|
|
}
|
|
|
|
return "clara";
|
|
} |