Skip to content

Commit

Permalink
docs: 문서에서 사용해볼 수 있는 데모 추가 (#210)
Browse files Browse the repository at this point in the history
* docs: disassembleHangul 및 disassembleHangulToGroups 문서에 데모 추가

* docs: acronymizeHangul 문서에 데모 추가

* docs: extractHangul 문서에 데모 추가

* docs: hangulIncludes 문서에 데모 추가

* chore: changeset 추가

* docs: 누락된 API title 명시

* chore: main sync

* feat: Update disassemble API in documentation

* fix: md -> mdx

* feat: amountToHangul 데모 추가

* feat: getChoseong 데모 추가

* chore: changeset 수정

* feat: romanize, standardizePronunciation, susa 데모 추가

* chore: changeset 수정

* feat: hasBatchim 데모 추가

* feat: canBe 문서에 데모 추가
  • Loading branch information
kangju2000 authored Aug 7, 2024
1 parent accc087 commit 65e2c7c
Show file tree
Hide file tree
Showing 19 changed files with 398 additions and 22 deletions.
6 changes: 6 additions & 0 deletions .changeset/fluffy-mirrors-kiss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'docs': patch
---

docs: 문서에서 사용해볼 수 있는 데모를 추가합니다.
(amountToHangul, disassemble, disassembleToGroups, getChoseong, hasBatchim, romanize, standardizePronunciation, susa)
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: amountToHangul
---

import { Sandpack } from '@/components/Sandpack';

# amountToHangul

Converts numeric amounts to the Korean reading of the [National Institute of Korean Language](https://ko.dict.naver.com/#/correct/korean/info?seq=602) rules.
Expand All @@ -20,3 +22,17 @@ amountToHangul('120,030원'); // '일십이만삼십'
amountToHangul('12345.6789'); // '일만이천삼백사십오점육칠팔구'
amountToHangul(15_201_100); // '일천오백이십만천백''
```

## Demo

<br />

<Sandpack>

```ts index.ts
import { amountToHangul } from 'es-hangul';

console.log(amountToHangul('15,201,100'));
```

</Sandpack>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: amountToHangul
---

import { Sandpack } from '@/components/Sandpack';

# amountToHangul

숫자나 문자를 [국립국어원](https://ko.dict.naver.com/#/correct/korean/info?seq=602) 규칙의 한글 읽기 문자열로 변환합니다.
Expand All @@ -20,3 +22,17 @@ amountToHangul('120,030원'); // '일십이만삼십'
amountToHangul('12345.6789'); // '일만이천삼백사십오점육칠팔구'
amountToHangul(15_201_100); // '일천오백이십만천백''
```

## 사용해보기

<br />

<Sandpack>

```ts index.ts
import { amountToHangul } from 'es-hangul';

console.log(amountToHangul('15,201,100'));
```

</Sandpack>
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@
title: canBe
---

# canBeChoseong
import { Sandpack } from '@/components/Sandpack';

# canBe

## canBeChoseong

Check if a given character can be a choseong in Korean.

```typescript
function canBeChoseong(character: string): boolean;
```

### Examples

```typescript
canBeChoseong(''); // true
canBeChoseong(''); // true
Expand All @@ -18,14 +24,30 @@ canBeChoseong('ㅏ'); // false
canBeChoseong(''); // false
```

# canBeJungseong
### Demo

<br />

<Sandpack>

```ts index.ts
import { canBeChoseong } from 'es-hangul';

console.log(canBeChoseong(''));
```

</Sandpack>

## canBeJungseong

Check if a given character can be a jungseong in Korean.

```typescript
function canBeJungseong(character: string): boolean;
```

### Examples

```typescript
canBeJungseong(''); // true
canBeJungseong('ㅗㅏ'); // true
Expand All @@ -35,14 +57,30 @@ canBeJungseong('ㄱㅅ'); // false
canBeJungseong(''); // false
```

# canBeJongseong
### Demo

<br />

<Sandpack>

```ts index.ts
import { canBeJungseong } from 'es-hangul';

console.log(canBeJungseong(''));
```

</Sandpack>

## canBeJongseong

Check if a given character can be a jongseong in Korean.

```typescript
function canBeJongseong(character: string): boolean;
```

### Examples

```typescript
canBeJongseong(''); // true
canBeJongseong('ㄱㅅ'); // true
Expand All @@ -51,3 +89,17 @@ canBeJongseong('가'); // false
canBeJongseong(''); // false
canBeJongseong('ㅗㅏ'); // false
```

### Demo

<br />

<Sandpack>

```ts index.ts
import { canBeJongseong } from 'es-hangul';

console.log(canBeJongseong(''));
```

</Sandpack>
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@
title: canBe
---

# canBeChoseong
import { Sandpack } from '@/components/Sandpack';

# canBe

## canBeChoseong

인자로 받은 문자가 초성으로 위치할 수 있는 문자인지 검사합니다.

```typescript
function canBeChoseong(character: string): boolean;
```

### Examples

```typescript
canBeChoseong(''); // true
canBeChoseong(''); // true
Expand All @@ -18,14 +24,30 @@ canBeChoseong('ㅏ'); // false
canBeChoseong(''); // false
```

# canBeJungseong
### 사용해보기

<br />

<Sandpack>

```ts index.ts
import { canBeJungseong } from 'es-hangul';

console.log(canBeJungseong(''));
```

</Sandpack>

## canBeJungseong

인자로 받은 문자가 중성으로 위치할 수 있는 문자인지 검사합니다.

```typescript
function canBeJungseong(character: string): boolean;
```

### Examples

```typescript
canBeJungseong(''); // true
canBeJungseong('ㅗㅏ'); // true
Expand All @@ -35,14 +57,30 @@ canBeJungseong('ㄱㅅ'); // false
canBeJungseong(''); // false
```

# canBeJongseong
### 사용해보기

<br />

<Sandpack>

```ts index.ts
import { canBeJungseong } from 'es-hangul';

console.log(canBeJungseong(''));
```

</Sandpack>

## canBeJongseong

인자로 받은 문자가 종성으로 위치할 수 있는 문자인지 검사합니다.

```typescript
function canBeJongseong(character: string): boolean;
```

### Examples

```typescript
canBeJongseong(''); // true
canBeJongseong('ㄱㅅ'); // true
Expand All @@ -51,3 +89,17 @@ canBeJongseong('가'); // false
canBeJongseong(''); // false
canBeJongseong('ㅗㅏ'); // false
```

### 사용해보기

<br />

<Sandpack>

```ts index.ts
import { canBeJongseong } from 'es-hangul';

console.log(canBeJongseong(''));
```

</Sandpack>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: disassemble
---

import { Sandpack } from '@/components/Sandpack';

# disassemble

Completely separates a Hangul string into its individual characters by initial consonants, medial vowels, and final consonants, creating a single string.
Expand All @@ -23,3 +25,17 @@ disassemble('값이 비싸다'); // 'ㄱㅏㅂㅅㅇㅣ ㅂㅣㅆㅏㄷㅏ'
disassemble(''); // 'ㅗㅏ'
disassemble(''); // 'ㄴㅈ'
```

## Demo

<br />

<Sandpack>

```ts index.ts
import { disassemble } from 'es-hangul';

console.log(disassemble(''));
```

</Sandpack>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: disassemble
---

import { Sandpack } from '@/components/Sandpack';

# disassemble

한글 문자열을 글자별로 초성/중성/종성 단위로 완전히 분리하여, 하나의 문자열로 만듭니다.
Expand All @@ -23,3 +25,17 @@ disassemble('값이 비싸다'); // 'ㄱㅏㅂㅅㅇㅣ ㅂㅣㅆㅏㄷㅏ'
disassemble(''); // 'ㅗㅏ'
disassemble(''); // 'ㄴㅈ'
```

## 사용해보기

<br />

<Sandpack>

```ts index.ts
import { disassemble } from 'es-hangul';

console.log(disassemble(''));
```

</Sandpack>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: disassembleToGroups
---

import { Sandpack } from '@/components/Sandpack';

# disassembleToGroups

Completely separate a Hangul string into individual characters based on the initial consonant, medial vowel, and final consonant.
Expand All @@ -24,3 +26,17 @@ disassembleToGroups('사과'); // [['ㅅ', 'ㅏ'], ['ㄱ', 'ㅗ', 'ㅏ']]
disassembleToGroups(''); // [['ㅗ', 'ㅏ']]
disassembleToGroups(''); // [['ㄴ', 'ㅈ']]
```

## Demo

<br />

<Sandpack>

```ts index.ts
import { disassembleToGroups } from 'es-hangul';

console.log(disassembleToGroups('사과'));
```

</Sandpack>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: disassembleToGroups
---

import { Sandpack } from '@/components/Sandpack';

# disassembleToGroups

한글 문자열을 글자별로 초성/중성/종성 단위로 완전히 분리합니다.
Expand All @@ -24,3 +26,17 @@ disassembleToGroups('사과'); // [['ㅅ', 'ㅏ'], ['ㄱ', 'ㅗ', 'ㅏ']]
disassembleToGroups(''); // [['ㅗ', 'ㅏ']]
disassembleToGroups(''); // [['ㄴ', 'ㅈ']]
```

## 사용해보기

<br />

<Sandpack>

```ts index.ts
import { disassembleToGroups } from 'es-hangul';

console.log(disassembleToGroups('사과'));
```

</Sandpack>
Loading

0 comments on commit 65e2c7c

Please sign in to comment.