aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-01-22 20:54:06 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-01-24 20:15:25 -0500
commit3c17388ff85daf477a1cae21103f705bce96bfcd (patch)
treeb5872f36f17e0cd9ff28214a1c8f8ccf888ed1af /ext/mixed/js
parent9c5f1d4e596c691b02ad6931036111832cd362d1 (diff)
Update constant naming convention
Diffstat (limited to 'ext/mixed/js')
-rw-r--r--ext/mixed/js/japanese.js5
1 files changed, 3 insertions, 2 deletions
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;