Created
April 20, 2023 13:59
-
-
Save Andrew-Pynch/967e9ead951f8fc6489da76ea0e30958 to your computer and use it in GitHub Desktop.
Typescript hiragana to romanji map
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 hiraganaToRomajiMap: Map<string, string> = new Map([ | |
['あ', 'a'], | |
['い', 'i'], | |
['う', 'u'], | |
['え', 'e'], | |
['お', 'o'], | |
['か', 'ka'], | |
['き', 'ki'], | |
['く', 'ku'], | |
['け', 'ke'], | |
['こ', 'ko'], | |
['さ', 'sa'], | |
['し', 'shi'], | |
['す', 'su'], | |
['せ', 'se'], | |
['そ', 'so'], | |
['た', 'ta'], | |
['ち', 'chi'], | |
['つ', 'tsu'], | |
['て', 'te'], | |
['と', 'to'], | |
['な', 'na'], | |
['に', 'ni'], | |
['ぬ', 'nu'], | |
['ね', 'ne'], | |
['の', 'no'], | |
['は', 'ha'], | |
['ひ', 'hi'], | |
['ふ', 'fu'], | |
['へ', 'he'], | |
['ほ', 'ho'], | |
['ま', 'ma'], | |
['み', 'mi'], | |
['む', 'mu'], | |
['め', 'me'], | |
['も', 'mo'], | |
['や', 'ya'], | |
['ゆ', 'yu'], | |
['よ', 'yo'], | |
['ら', 'ra'], | |
['り', 'ri'], | |
['る', 'ru'], | |
['れ', 're'], | |
['ろ', 'ro'], | |
['わ', 'wa'], | |
['を', 'wo'], | |
['ん', 'n'] | |
]); | |
// Usage example: | |
console.log(hiraganaToRomajiMap.get('あ')); // Output: 'a' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment