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) {
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;