Skip to content

Commit

Permalink
docs/test: 테스트 파일 분리와 누락된 문서화 추가 (#305)
Browse files Browse the repository at this point in the history
* canbe 분리

* combine 분리

* date > days로 변경

* disassemble 분리

* function 수정 및 import문 수정

* fix error

* 사용되지 않는 파일 제거

* 문서화 되어 있지 않던 기능을 문서화합니다
  • Loading branch information
po4tion authored Dec 8, 2024
1 parent 0ced4dd commit 0896035
Show file tree
Hide file tree
Showing 55 changed files with 975 additions and 720 deletions.
12 changes: 4 additions & 8 deletions docs/src/pages/docs/api/assemble.ko.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ title: assemble

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


# assemble

인자로 받은 배열에 담긴 한글 문장과 문자를 한글 규칙에 맞게 합성합니다.
Expand All @@ -13,11 +12,9 @@ import { Sandpack } from '@/components/Sandpack';
function assemble(
// 한글 문자와 문장을 담고 있는 배열
words: string[]
): string
): string;
```



## 사용해보기

<br />
Expand All @@ -27,10 +24,9 @@ function assemble(
```ts index.ts
import { assemble } from 'es-hangul';

console.log(assemble(['아버지가', ' ', '방ㅇ', 'ㅔ ', '들ㅇ', 'ㅓ갑니다']))
console.log(assemble(['아버지가', ' ', '방에 ', '들어갑니다']))
console.log(assemble(['ㅇ', 'ㅏ', 'ㅂ', 'ㅓ', 'ㅈ', 'ㅣ']))
console.log(assemble(['아버지가', ' ', '방ㅇ', '', '들ㅇ', 'ㅓ갑니다']));
console.log(assemble(['아버지가', ' ', '방에 ', '들어갑니다']));
console.log(assemble(['', '', '', '', '', '']));
```

</Sandpack>

105 changes: 0 additions & 105 deletions docs/src/pages/docs/api/canBe.en.mdx

This file was deleted.

105 changes: 0 additions & 105 deletions docs/src/pages/docs/api/canBe.ko.mdx

This file was deleted.

37 changes: 37 additions & 0 deletions docs/src/pages/docs/api/canBeChoseong.en.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: canBeChoseong
---

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

# canBeChoseong

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

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

## Examples

```typescript
canBeChoseong(''); // true
canBeChoseong(''); // true
canBeChoseong('ㄱㅅ'); // false
canBeChoseong(''); // false
canBeChoseong(''); // false
```

## Demo

<br />

<Sandpack>

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

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

</Sandpack>
37 changes: 37 additions & 0 deletions docs/src/pages/docs/api/canBeChoseong.ko.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: canBeChoseong
---

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

# canBeChoseong

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

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

## Examples

```typescript
canBeChoseong(''); // true
canBeChoseong(''); // true
canBeChoseong('ㄱㅅ'); // false
canBeChoseong(''); // false
canBeChoseong(''); // false
```

## 사용해보기

<br />

<Sandpack>

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

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

</Sandpack>
38 changes: 38 additions & 0 deletions docs/src/pages/docs/api/canBeJongseong.en.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: canBeJongseong
---

import { Sandpack } from '@/components/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
canBeJongseong('ㅎㄹ'); // false
canBeJongseong(''); // false
canBeJongseong(''); // false
canBeJongseong('ㅗㅏ'); // false
```

## Demo

<br />

<Sandpack>

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

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

</Sandpack>
Loading

0 comments on commit 0896035

Please sign in to comment.