-
Notifications
You must be signed in to change notification settings - Fork 95
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
feat: removeLastHangulCharacter 추가 #56
Conversation
🦋 Changeset detectedLatest commit: 12ce776 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 |
✅ Deploy Preview for es-hangul ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -0,0 +1,4 @@ | |||
export function excludeLastElement(array: string[]): [string[], string] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#36 (review) 에서 언급되었던 "라이브러리 내부에서만 사용될 함수"를 위해 _internal.ts
모듈을 생성했습니다.
import { describe, it, expect } from 'vitest'; | ||
import { removeLastHangulCharacter } from './removeLastHangulCharacter'; | ||
|
||
describe('removeLastCharacter', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
마이너합니다! 파일명, 함수명과 describe를 맞춰도 좋을 것 같아서요!
describe('removeLastCharacter', () => { | |
describe('removeLastHangulCharacter', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오 바로 반영하도록 하겠습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a72646e 에서 반영 완료하였습니다 🙇
* removeLastHangulCharacter('프론트엔드') // 프론트엔ㄷ | ||
* removeLastHangulCharacter('일요일') // 일요이 | ||
*/ | ||
export function removeLastHangulCharacter(words: string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
한 단어를 받는 인자라면 복수인 words가 아닌, word로 해도 좋을 것 같아요!
export function removeLastHangulCharacter(words: string) { | |
export function removeLastHangulCharacter(word: string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"안녕하세요 값"처럼 2개 이상의 word도 받을 수 있어서 복수형으로 정의했습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오오 맞네요! 좋아요~!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
매번 PR을 리뷰하기 좋은 단위로 구분하여 만들어주셔서 너무 좋은 것 같아요!
…/es-hangul into feat/removeLastHangulCharacter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 😃
Overview
인자로 받은 한글 문자열에서 마지막 한글 문자 하나를 제거하여 반환하는
removeLastHangulCharacter
함수를 추가합니다.이 함수는 개별적으로 사용되기도 하겠지만, #18 에서 제안된
assemble
함수의 연음법칙을 구현할 때도 사용됩니다.PR Checklist