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

feat : 문장의 각 단어 중 첫 문자만 뽑는 함수추가 ( #128 이슈에 대한 ) #133

Merged
merged 26 commits into from
Jun 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c811e8d
feat : 문장의 각 단어 중 첫 문자만 뽑는 함수추가
KNU-K Jun 25, 2024
2b7fbd4
add : 한글 문장인지 여부 판별 함수 추가
KNU-K Jun 28, 2024
cc53591
fix : 한글 문장인지 여부 판별 기저 및 오류 추가 / arg 이름 변경
KNU-K Jun 28, 2024
dcecb15
fix: src/_internal/hangul.ts
KNU-K Jun 29, 2024
b31a5b3
fix : rename function
KNU-K Jun 29, 2024
2e2b134
fix : rename function
KNU-K Jun 29, 2024
ea4cb1b
Merge branch 'main' of https://github.com/KNU-K/es-hangul
KNU-K Jun 29, 2024
83fd467
Merge branch 'main' into main
KNU-K Jun 29, 2024
7bd33ed
fix : lint error
KNU-K Jun 29, 2024
fffd30e
Merge branch 'main' of https://github.com/KNU-K/es-hangul
KNU-K Jun 29, 2024
1d74c1e
fix : index에 추가
KNU-K Jun 29, 2024
e5e7765
chore : doc 추가
KNU-K Jun 29, 2024
9c72739
fix : 문서화 한글 영어 바뀐거 바로 변경
KNU-K Jun 29, 2024
1ba5c31
Merge branch 'main' into main
KNU-K Jun 29, 2024
53544bd
fix : isHangul로 대체 #136 으로
KNU-K Jun 29, 2024
444e217
Merge branch 'main' of https://github.com/KNU-K/es-hangul
KNU-K Jun 29, 2024
4afa4d9
chore : doc수정
KNU-K Jun 29, 2024
8079b7d
Update docs/src/pages/docs/api/getHangulAcronym.en.mdx
KNU-K Jun 29, 2024
e409273
fix : Update hangul.ts
KNU-K Jun 29, 2024
4e4e5bd
Update getHangulAcronym.ko.mdx
KNU-K Jun 29, 2024
c6f1bc4
Update getHangulAcronym.en.mdx
KNU-K Jun 29, 2024
ba3ed2a
Update src/getHangulAcronym.ts
KNU-K Jun 29, 2024
00b3560
Update src/getHangulAcronym.ts
KNU-K Jun 29, 2024
b7dd6a7
Update getHangulAcronym.ts
KNU-K Jun 29, 2024
a36ab58
Update getHangulAcronym.spec.ts
KNU-K Jun 29, 2024
3ffcd89
Create fair-brooms-drive.md
okinawaa Jun 29, 2024
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
8 changes: 8 additions & 0 deletions src/getFirstHangulLetters.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { getFirstHangulLetters } from './getFirstHangulLetters';

describe('getFirstHangulLetters', () => {
it('한글 문장 단어중 첫 문자만 뽑은 리스트를 반환', () => {
expect(getFirstHangulLetters('치킨과 맥주')).toHaveLength(2);
expect(getFirstHangulLetters('치킨과 맥주').join('')).toBe('치맥');
});
});
7 changes: 7 additions & 0 deletions src/getFirstHangulLetters.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export function getFirstHangulLetters(str: string) {
const words = str.split(' ');

const firstHangulLetters = words.map(word => word.charAt(0));

return firstHangulLetters;
}
KNU-K marked this conversation as resolved.
Show resolved Hide resolved