Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: assemble 에 대한 문서화를 진행합니다 #230

Merged
merged 7 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions docs/src/pages/docs/api/assemble.en.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: assemble
---


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


# assemble

Combine the Korean sentences and characters in the array received as input according to Korean language rules.

```typescript
function assemble(
// An array containing Korean characters and sentences.
words: string[]
): string
```



## Demo

<br />

<Sandpack>

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

okinawaa marked this conversation as resolved.
Show resolved Hide resolved
console.log(assemble(['아버지가', ' ', '방ㅇ', 'ㅔ ', '들ㅇ', 'ㅓ갑니다']))
console.log(assemble(['아버지가', ' ', '방에 ', '들어갑니다']))
console.log(assemble(['ㅇ', 'ㅏ', 'ㅂ', 'ㅓ', 'ㅈ', 'ㅣ']))
```

</Sandpack>

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

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


# assemble

인자로 받은 배열에 담긴 한글 문장과 문자를 한글 규칙에 맞게 합성합니다.

```typescript
function assemble(
// 한글 문자와 문장을 담고 있는 배열
words: string[]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분은 반드시 words(단어들)이 아닌 거 같아서 이슈로 딸게요

): string
```



## 사용해보기

<br />

<Sandpack>

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

okinawaa marked this conversation as resolved.
Show resolved Hide resolved
console.log(assemble(['아버지가', ' ', '방ㅇ', 'ㅔ ', '들ㅇ', 'ㅓ갑니다']))
console.log(assemble(['아버지가', ' ', '방에 ', '들어갑니다']))
console.log(assemble(['ㅇ', 'ㅏ', 'ㅂ', 'ㅓ', 'ㅈ', 'ㅣ']))
```

</Sandpack>