Skip to content

Commit

Permalink
docs: fix copy-paste error for canBeJungsung and canBeJongsung. (#92
Browse files Browse the repository at this point in the history
)

* Fix examples for `canBeJungsung`

* Fix examples for `canBeJongsung`
  • Loading branch information
leejy12 authored May 16, 2024
1 parent cd6fdd5 commit 026d015
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { disassembleCompleteHangulCharacter } from './disassembleCompleteHangulC
export function hasBatchim(str: string) {
const lastChar = str[str.length - 1];

if(lastChar == null) {
if (lastChar == null) {
return false;
}

Expand Down Expand Up @@ -132,12 +132,12 @@ export function canBeChosung(character: string): character is (typeof HANGUL_CHA
* ): boolean
* ```
* @example
* canBeChosung('ㅏ') // true
* canBeChosung('ㅗㅏ') // true
* canBeChosung('ㅏㅗ') // false
* canBeChosung('ㄱ') // false
* canBeChosung('ㄱㅅ') // false
* canBeChosung('가') // false
* canBeJungsung('ㅏ') // true
* canBeJungsung('ㅗㅏ') // true
* canBeJungsung('ㅏㅗ') // false
* canBeJungsung('ㄱ') // false
* canBeJungsung('ㄱㅅ') // false
* canBeJungsung('가') // false
*/
export function canBeJungsung(character: string): character is (typeof HANGUL_CHARACTERS_BY_MIDDLE_INDEX)[number] {
return hasValueInReadOnlyStringList(HANGUL_CHARACTERS_BY_MIDDLE_INDEX, character);
Expand All @@ -154,12 +154,12 @@ export function canBeJungsung(character: string): character is (typeof HANGUL_CH
* ): boolean
* ```
* @example
* canBeChosung('ㄱ') // true
* canBeChosung('ㄱㅅ') // true
* canBeChosung('ㅎㄹ') // false
* canBeChosung('가') // false
* canBeChosung('ㅏ') // false
* canBeChosung('ㅗㅏ') // false
* canBeJongsung('ㄱ') // true
* canBeJongsung('ㄱㅅ') // true
* canBeJongsung('ㅎㄹ') // false
* canBeJongsung('가') // false
* canBeJongsung('ㅏ') // false
* canBeJongsung('ㅗㅏ') // false
*/
export function canBeJongsung(character: string): character is (typeof HANGUL_CHARACTERS_BY_LAST_INDEX)[number] {
return hasValueInReadOnlyStringList(HANGUL_CHARACTERS_BY_LAST_INDEX, character);
Expand Down

0 comments on commit 026d015

Please sign in to comment.