From 3c17388ff85daf477a1cae21103f705bce96bfcd Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Wed, 22 Jan 2020 20:54:06 -0500 Subject: Update constant naming convention --- ext/mixed/js/japanese.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ext/mixed/js') diff --git a/ext/mixed/js/japanese.js b/ext/mixed/js/japanese.js index 25f0608e..8dd5651c 100644 --- a/ext/mixed/js/japanese.js +++ b/ext/mixed/js/japanese.js @@ -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) { const code = c.charCodeAt(0); return ( @@ -267,7 +268,7 @@ function jpConvertHalfWidthKanaToFullWidth(text, sourceMapping) { for (let i = 0; i < ii; ++i) { const c = text[i]; - const mapping = jpHalfWidthCharacterMapping.get(c); + const mapping = JP_HALFWIDTH_KATAKANA_MAPPING.get(c); if (typeof mapping !== 'string') { result += c; continue; -- cgit v1.2.3