Created
April 1, 2026 07:12
-
-
Save The-LukeZ/bfa4e20a054d974cc8b8948e296c2732 to your computer and use it in GitHub Desktop.
Upside down text
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const FLIP_MAP: Record<string, string> = { | |
| a: "ɐ", | |
| b: "q", | |
| c: "ɔ", | |
| d: "p", | |
| e: "ǝ", | |
| f: "ɟ", | |
| g: "ƃ", | |
| h: "ɥ", | |
| i: "ᴉ", | |
| j: "ɾ", | |
| k: "ʞ", | |
| l: "l", | |
| m: "ɯ", | |
| n: "u", | |
| o: "o", | |
| p: "d", | |
| q: "b", | |
| r: "ɹ", | |
| s: "s", | |
| t: "ʇ", | |
| u: "n", | |
| v: "ʌ", | |
| w: "ʍ", | |
| x: "x", | |
| y: "ʎ", | |
| z: "z", | |
| A: "∀", | |
| B: "ᗺ", | |
| C: "Ɔ", | |
| D: "ᗡ", | |
| E: "Ǝ", | |
| F: "Ⅎ", | |
| G: "פ", | |
| H: "H", | |
| I: "I", | |
| J: "ſ", | |
| K: "ʞ", | |
| L: "⅂", | |
| M: "W", | |
| N: "N", | |
| O: "O", | |
| P: "Ԁ", | |
| Q: "Q", | |
| R: "ᴚ", | |
| S: "S", | |
| T: "⊥", | |
| U: "∩", | |
| V: "Λ", | |
| W: "M", | |
| X: "X", | |
| Y: "⅄", | |
| Z: "Z", | |
| "0": "0", | |
| "1": "Ɩ", | |
| "2": "ᄅ", | |
| "3": "Ɛ", | |
| "4": "ㄣ", | |
| "5": "ϛ", | |
| "6": "9", | |
| "7": "ㄥ", | |
| "8": "8", | |
| "9": "6", | |
| ".": "˙", | |
| ",": "'", | |
| "?": "¿", | |
| "!": "¡", | |
| "'": ",", | |
| "(": ")", | |
| ")": "(", | |
| "[": "]", | |
| "]": "[", | |
| "{": "}", | |
| "}": "{", | |
| "<": ">", | |
| ">": "<", | |
| "&": "⅋", | |
| _: "‾", | |
| }; | |
| // Build the reverse map automatically from FLIP_MAP | |
| const REVERSE_MAP: Record<string, string> = Object.fromEntries( | |
| Object.entries(FLIP_MAP).map(([k, v]) => [v, k]), | |
| ); | |
| function flipText(text: string): string { | |
| return text | |
| .split("") | |
| .map((char) => FLIP_MAP[char] ?? char) | |
| .reverse() | |
| .join(""); | |
| } | |
| function unflipText(text: string): string { | |
| return text | |
| .split("") | |
| .reverse() | |
| .map((char) => REVERSE_MAP[char] ?? char) | |
| .join(""); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const original = "support"; | |
| const flipped = flipText(original); // 'ʇɹoddns' | |
| const restored = unflipText(flipped); // 'support' | |
| console.log(original); | |
| console.log(flipped); | |
| console.log(restored); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment