From 21684f6d378b4360d42b4b23faa053a51eb8b96f Mon Sep 17 00:00:00 2001 From: Collection50 Date: Sun, 4 Aug 2024 23:51:22 +0900 Subject: [PATCH] fix: conflict --- docs/src/pages/docs/api/canBe.en.md | 3 --- docs/src/pages/docs/api/canBe.ko.md | 3 --- docs/src/pages/docs/api/getChoseong.en.mdx | 13 ++++--------- docs/src/pages/docs/api/getChoseong.ko.mdx | 9 +++------ docs/src/pages/docs/api/hasBatchim.en.mdx | 14 ++++++-------- docs/src/pages/docs/api/hasBatchim.ko.mdx | 14 ++++---------- src/assemble.ts | 10 ---------- 7 files changed, 17 insertions(+), 49 deletions(-) diff --git a/docs/src/pages/docs/api/canBe.en.md b/docs/src/pages/docs/api/canBe.en.md index 5705ba7b..1338188f 100644 --- a/docs/src/pages/docs/api/canBe.en.md +++ b/docs/src/pages/docs/api/canBe.en.md @@ -1,10 +1,7 @@ -<<<<<<< HEAD -======= --- title: canBe --- ->>>>>>> v2 # canBeChoseong Check if a given character can be a choseong in Korean. diff --git a/docs/src/pages/docs/api/canBe.ko.md b/docs/src/pages/docs/api/canBe.ko.md index 6746ec4d..ede91e95 100644 --- a/docs/src/pages/docs/api/canBe.ko.md +++ b/docs/src/pages/docs/api/canBe.ko.md @@ -1,10 +1,7 @@ -<<<<<<< HEAD -======= --- title: canBe --- ->>>>>>> v2 # canBeChoseong 인자로 받은 문자가 초성으로 위치할 수 있는 문자인지 검사합니다. diff --git a/docs/src/pages/docs/api/getChoseong.en.mdx b/docs/src/pages/docs/api/getChoseong.en.mdx index 3d4bd4f8..9335dc86 100644 --- a/docs/src/pages/docs/api/getChoseong.en.mdx +++ b/docs/src/pages/docs/api/getChoseong.en.mdx @@ -1,19 +1,14 @@ -<<<<<<< HEAD -# getChoseong - -======= --- title: getChoseong --- # getChoseong ->>>>>>> v2 Extracts the Choseong from a Korean word. (Example: 사과 -> 'ㅅㄱ') ```typescript function getChoseong( - // Korean string from which to extract the choseong + // Korean string from which to extract the choseong word: string ): string; ``` @@ -21,7 +16,7 @@ function getChoseong( ## Examples ```tsx -getChoseong('사과') // 'ㅅㄱ' -getChoseong('리액트') // 'ㄹㅇㅌ' -getChoseong('띄어 쓰기') // 'ㄸㅇ ㅆㄱ' +getChoseong('사과'); // 'ㅅㄱ' +getChoseong('리액트'); // 'ㄹㅇㅌ' +getChoseong('띄어 쓰기'); // 'ㄸㅇ ㅆㄱ' ``` diff --git a/docs/src/pages/docs/api/getChoseong.ko.mdx b/docs/src/pages/docs/api/getChoseong.ko.mdx index 371fe863..acab11d2 100644 --- a/docs/src/pages/docs/api/getChoseong.ko.mdx +++ b/docs/src/pages/docs/api/getChoseong.ko.mdx @@ -1,10 +1,7 @@ -<<<<<<< HEAD -======= --- title: getChoseong --- ->>>>>>> v2 # getChoseong 단어에서 초성을 추출합니다. (예: `사과` -> `'ㅅㄱ'`) @@ -21,7 +18,7 @@ function getChoseong( ## Examples ```tsx -getChoseong('사과') // 'ㅅㄱ' -getChoseong('리액트') // 'ㄹㅇㅌ' -getChoseong('띄어 쓰기') // 'ㄸㅇ ㅆㄱ' +getChoseong('사과'); // 'ㅅㄱ' +getChoseong('리액트'); // 'ㄹㅇㅌ' +getChoseong('띄어 쓰기'); // 'ㄸㅇ ㅆㄱ' ``` diff --git a/docs/src/pages/docs/api/hasBatchim.en.mdx b/docs/src/pages/docs/api/hasBatchim.en.mdx index 8de58057..b5fe9e55 100644 --- a/docs/src/pages/docs/api/hasBatchim.en.mdx +++ b/docs/src/pages/docs/api/hasBatchim.en.mdx @@ -1,25 +1,23 @@ -<<<<<<< HEAD -======= --- title: hasBatchim --- ->>>>>>> v2 # hasBatchim + Checks if the last character of a Korean string has a batchim (jongseong). -```typescript +````typescript hasBatchim( - str: string, - // checking for single batchim + str: string, + // checking for single batchim options?: { single?: boolean } ): boolean - + ```typescript hasBatchim('값') // true hasBatchim('토') // false hasBatchim('갑', { single: true }) // true hasBatchim('값', { single: true }) // false hasBatchim('토', { single: true }) // false - ```` +```` diff --git a/docs/src/pages/docs/api/hasBatchim.ko.mdx b/docs/src/pages/docs/api/hasBatchim.ko.mdx index 3db28f19..73eac438 100644 --- a/docs/src/pages/docs/api/hasBatchim.ko.mdx +++ b/docs/src/pages/docs/api/hasBatchim.ko.mdx @@ -1,29 +1,23 @@ -<<<<<<< HEAD -# hasBatchim - -======= --- title: hasBatchim --- # hasBatchim ->>>>>>> v2 한글 문자열의 마지막 글자가 받침이 있는지 확인합니다. - -```typescript +````typescript hasBatchim( - str: string, + str: string, // 홑받침 여부를 확인할지 여부 options?: { single?: boolean } ): boolean - + ```typescript hasBatchim('값') // true hasBatchim('토') // false hasBatchim('갑', { single: true }) // true hasBatchim('값', { single: true }) // false hasBatchim('토', { single: true }) // false - ```` +```` diff --git a/src/assemble.ts b/src/assemble.ts index 4fb73f91..66ebbf06 100644 --- a/src/assemble.ts +++ b/src/assemble.ts @@ -1,9 +1,5 @@ import { disassemble } from './disassemble'; -<<<<<<< HEAD import { binaryAssemble } from './_internal/hangul'; -======= -import { binaryAssembleHangul } from './_internal/hangul'; ->>>>>>> v2 /** * @name assemble @@ -20,13 +16,7 @@ import { binaryAssembleHangul } from './_internal/hangul'; * assemble(['아버지가', ' ', '방에 ', '들어갑니다']) // 아버지가 방에 들어갑니다 * assemble(['ㅇ', 'ㅏ', 'ㅂ', 'ㅓ', 'ㅈ', 'ㅣ']) // 아버지 */ -<<<<<<< HEAD export function assemble(words: string[]) { const disassembled = disassemble(words.join('')).split(''); return disassembled.reduce(binaryAssemble); -======= -export function assembleHangul(words: string[]) { - const disassembled = disassemble(words.join('')).split(''); - return disassembled.reduce(binaryAssembleHangul); ->>>>>>> v2 }