Skip to content

Commit 101672e

Browse files
authored
fix: JUNSEONGS 상수명을 JUNGSEONGS로 수정 (#364)
1 parent 69e6ef5 commit 101672e

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/_internal/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export const CHOSEONGS = [
9797
/**
9898
* 중성으로 올 수 있는 한글 글자
9999
*/
100-
export const JUNSEONGS = Object.values(DISASSEMBLED_VOWELS_BY_VOWEL);
100+
export const JUNGSEONGS = Object.values(DISASSEMBLED_VOWELS_BY_VOWEL);
101101

102102
/**
103103
* 종성으로 올 수 있는 한글 글자

src/core/canBeJungseong/canBeJungseong.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { hasValueInReadOnlyStringList } from '@/_internal';
2-
import { DISASSEMBLED_VOWELS_BY_VOWEL, JUNSEONGS } from '@/_internal/constants';
2+
import { DISASSEMBLED_VOWELS_BY_VOWEL, JUNGSEONGS } from '@/_internal/constants';
33

44
/**
55
* @name canBeJungseong
@@ -20,7 +20,7 @@ import { DISASSEMBLED_VOWELS_BY_VOWEL, JUNSEONGS } from '@/_internal/constants';
2020
* canBeJungseong('ㄱㅅ') // false
2121
* canBeJungseong('가') // false
2222
*/
23-
export function canBeJungseong(character: string): character is (typeof JUNSEONGS)[number] {
23+
export function canBeJungseong(character: string): character is (typeof JUNGSEONGS)[number] {
2424
if (!character) {
2525
return false;
2626
}
@@ -31,5 +31,5 @@ export function canBeJungseong(character: string): character is (typeof JUNSEONG
3131
}
3232

3333
// 분해된 이중모음 문자인 경우 (ㅗㅏ, ㅜㅓ 등)
34-
return hasValueInReadOnlyStringList(JUNSEONGS, character);
34+
return hasValueInReadOnlyStringList(JUNGSEONGS, character);
3535
}

src/core/combineCharacter/combineCharacter.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CHOSEONGS, COMPLETE_HANGUL_START_CHARCODE, JONGSEONGS, JUNSEONGS } from '@/_internal/constants';
1+
import { CHOSEONGS, COMPLETE_HANGUL_START_CHARCODE, JONGSEONGS, JUNGSEONGS } from '@/_internal/constants';
22
import { canBeChoseong } from '@/core/canBeChoseong';
33
import { canBeJongseong } from '@/core/canBeJongseong';
44
import { canBeJungseong } from '@/core/canBeJungseong';
@@ -26,11 +26,11 @@ export function combineCharacter(choseong: string, jungseong: string, jongseong
2626
throw new Error(`Invalid hangul Characters: ${choseong}, ${jungseong}, ${jongseong}`);
2727
}
2828

29-
const numOfJungseongs = JUNSEONGS.length;
29+
const numOfJungseongs = JUNGSEONGS.length;
3030
const numOfJongseongs = JONGSEONGS.length;
3131

3232
const choseongIndex = CHOSEONGS.indexOf(choseong as (typeof CHOSEONGS)[number]);
33-
const jungseongIndex = JUNSEONGS.indexOf(jungseong as (typeof JUNSEONGS)[number]);
33+
const jungseongIndex = JUNGSEONGS.indexOf(jungseong as (typeof JUNGSEONGS)[number]);
3434
const jongseongIndex = JONGSEONGS.indexOf(jongseong as (typeof JONGSEONGS)[number]);
3535

3636
const choseongOfTargetConsonant = choseongIndex * numOfJungseongs * numOfJongseongs;

src/core/disassembleCompleteCharacter/disassembleCompleteCharacter.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ import {
33
COMPLETE_HANGUL_END_CHARCODE,
44
COMPLETE_HANGUL_START_CHARCODE,
55
JONGSEONGS,
6-
JUNSEONGS,
6+
JUNGSEONGS,
77
NUMBER_OF_JONGSEONG,
88
NUMBER_OF_JUNGSEONG,
99
} from '@/_internal/constants';
1010

1111
interface ReturnTypeDisassembleCompleteCharacter {
1212
choseong: (typeof CHOSEONGS)[number];
13-
jungseong: (typeof JUNSEONGS)[number];
13+
jungseong: (typeof JUNGSEONGS)[number];
1414
jongseong: (typeof JONGSEONGS)[number];
1515
}
1616

@@ -45,7 +45,7 @@ export function disassembleCompleteCharacter(letter: string): ReturnTypeDisassem
4545

4646
return {
4747
choseong: CHOSEONGS[choseongIndex],
48-
jungseong: JUNSEONGS[jungseongIndex],
48+
jungseong: JUNGSEONGS[jungseongIndex],
4949
jongseong: JONGSEONGS[jongseongIndex],
5050
} as const;
5151
}

0 commit comments

Comments
 (0)