Skip to content

Commit

Permalink
chore: assemble함수의 파라미터 명을 words가 아닌 fragments로 수정합니다 (#316)
Browse files Browse the repository at this point in the history
* words to fragments

* remove unused file
  • Loading branch information
okinawaa authored Jan 16, 2025
1 parent 5c2f44e commit 4615093
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/src/pages/docs/api/assemble.en.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Combine the Korean sentences and characters in the array received as input accor
```typescript
function assemble(
// An array containing Korean characters and sentences.
words: string[]
fragments: string[]
): string
```

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/docs/api/assemble.ko.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Sandpack } from '@/components/Sandpack';
```typescript
function assemble(
// 한글 문자와 문장을 담고 있는 배열
words: string[]
fragments: string[]
): string;
```

Expand Down
6 changes: 3 additions & 3 deletions src/assemble/assemble.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ import { binaryAssemble } from '../_internal/hangul';
* ```typescript
* assemble(
* // 한글 문자와 문장을 담고 있는 배열
* words: string[]
* fragments: string[]
* ): string
* ```
* @example
* assemble(['아버지가', ' ', '방ㅇ', 'ㅔ ', '들ㅇ', 'ㅓ갑니다']) // 아버지가 방에 들어갑니다
* assemble(['아버지가', ' ', '방에 ', '들어갑니다']) // 아버지가 방에 들어갑니다
* assemble(['ㅇ', 'ㅏ', 'ㅂ', 'ㅓ', 'ㅈ', 'ㅣ']) // 아버지
*/
export function assemble(words: string[]) {
const disassembled = disassemble(words.join('')).split('');
export function assemble(fragments: string[]) {
const disassembled = disassemble(fragments.join('')).split('');
return disassembled.reduce(binaryAssemble);
}

0 comments on commit 4615093

Please sign in to comment.