toss / es-hangul

A modern JavaScript library for handling Hangul characters.
https://es-hangul.slash.page/
MIT License
1.34k stars 95 forks source link

feat: 한글 문장과 문자가 담긴 배열을 인자로 받아 규칙에 맞게 합성하는 `assemble` 함수 추가 #64

Closed evan-moon closed 6 months ago

evan-moon commented 6 months ago

Overview

https://github.com/toss/es-hangul/issues/18 에서 이슈레이징되었던 한글 문장과 문자가 담긴 배열을 인자로 받아 규칙에 맞게 합성하는 assemble 함수, 그리고 한글 문장의 마지막 글자의 홑받침 여부를 판단하는 hasSingleBatchim를 추가합니다.

assembleHangul(['아버지가', ' ', '방ㅇ', 'ㅔ ', '들ㅇ', 'ㅓ갑니다']); // 아버지가 방에 들어갑니다
assembleHangul(['아버지가', ' ', '방에 ', '들어갑니다']); // 아버지가 방에 들어갑니다
assembleHangul(['ㅇ', 'ㅏ', 'ㅂ', 'ㅓ', 'ㅈ', 'ㅣ']); // 아버지
hasSingleBatchim('갑') // true
hasSingleBatchim('값') // false
hasSingleBatchim('토') // false

기타 변경사항

PR Checklist

  1. I have read the Contributing Guide
  2. I have written documents and tests, if needed.
changeset-bot[bot] commented 6 months ago

🦋 Changeset detected

Latest commit: d791949d7fc342f43b4f9ede3d4166f2f1a9a965

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

vercel[bot] commented 6 months ago

@evan-moon is attempting to deploy a commit to the Toss Team on Vercel.

A member of the Team first needs to authorize it.

netlify[bot] commented 6 months ago

Deploy Preview for es-hangul ready!

Name Link
Latest commit 71f8a338035c7d66fbd116d682beeafd4e5028fc
Latest deploy log https://app.netlify.com/sites/es-hangul/deploys/662229cbc7948100082866bd
Deploy Preview https://deploy-preview-64--es-hangul.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

codecov-commenter commented 6 months ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@b420276). Click here to learn what that means. The diff coverage is 100.00%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/toss/es-hangul/pull/64/graphs/tree.svg?width=650&height=150&src=pr&token=My9jTW6bSr&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toss)](https://app.codecov.io/gh/toss/es-hangul/pull/64?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toss) ```diff @@ Coverage Diff @@ ## main #64 +/- ## ======================================= Coverage ? 98.96% ======================================= Files ? 12 Lines ? 193 Branches ? 43 ======================================= Hits ? 191 Misses ? 2 Partials ? 0 ```