Update constant naming convention

This commit is contained in:
toasted-nutbread 2020-01-22 20:54:06 -05:00
parent 9c5f1d4e59
commit 3c17388ff8

View File

@ -17,7 +17,7 @@
*/ */
const jpHalfWidthCharacterMapping = new Map([ const JP_HALFWIDTH_KATAKANA_MAPPING = new Map([
['ヲ', 'ヲヺ-'], ['ヲ', 'ヲヺ-'],
['ァ', 'ァ--'], ['ァ', 'ァ--'],
['ィ', 'ィ--'], ['ィ', 'ィ--'],
@ -76,6 +76,7 @@ const jpHalfWidthCharacterMapping = new Map([
['ン', 'ン--'] ['ン', 'ン--']
]); ]);
function jpIsKanji(c) { function jpIsKanji(c) {
const code = c.charCodeAt(0); const code = c.charCodeAt(0);
return ( return (
@ -267,7 +268,7 @@ function jpConvertHalfWidthKanaToFullWidth(text, sourceMapping) {
for (let i = 0; i < ii; ++i) { for (let i = 0; i < ii; ++i) {
const c = text[i]; const c = text[i];
const mapping = jpHalfWidthCharacterMapping.get(c); const mapping = JP_HALFWIDTH_KATAKANA_MAPPING.get(c);
if (typeof mapping !== 'string') { if (typeof mapping !== 'string') {
result += c; result += c;
continue; continue;