https://github.com/toss/es-hangul
A modern JavaScript library for handling Hangul characters.
https://github.com/toss/es-hangul
Last synced: about 1 year ago
JSON representation
A modern JavaScript library for handling Hangul characters.
- Host: GitHub
- URL: https://github.com/toss/es-hangul
- Owner: toss
- License: mit
- Created: 2024-03-29T16:05:45.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-13T22:25:38.000Z (about 2 years ago)
- Last Synced: 2024-04-14T12:16:21.838Z (about 2 years ago)
- Language: TypeScript
- Homepage: https://es-hangul.slash.page/
- Size: 1.95 MB
- Stars: 157
- Watchers: 4
- Forks: 9
- Open Issues: 6
-
Metadata Files:
- Readme: README-en_us.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README

# es-hangul
[한국어](https://github.com/toss/es-hangul/blob/main/README.md) | English
es-hangul is a library that makes it easy to handle [Hangul](https://en.wikipedia.org/wiki/Hangul) in JavaScript. It provides a modern API that is easy to use. Because it uses ECMAScript Modules, users can download the minimum amount of code when used in a browser environment.
## Examples
You can easily implement tasks related to Hangul, such as initial consonant search and attaching particles(josas).
```tsx
import { getChoseong } from 'es-hangul';
const searchWord = '라면';
const userInput = 'ㄹㅁ';
const result = getChoseong(searchWord); // ㄹㅁ
// Check if the 'choseong' of the search word match the user input
if (result === userInput) {
something()
}
```
```tsx
import { josa } from 'es-hangul';
const word1 = '사과';
const sentence1 = josa(word1, '을/를') + ' 먹었습니다.';
console.log(sentence1); // '사과를 먹었습니다.'
const word2 = '바나나';
const sentence2 = josa(word2, '이/가') + ' 맛있습니다.';
console.log(sentence2); // '바나나가 맛있습니다.'
```
## Contributing
We welcome contribution from everyone in the community. Read below for detailed contribution guide.
[CONTRIBUTING](https://github.com/toss/es-hangul/blob/main/.github/CONTRIBUTING.md)
## Thanks to
We would like to express our special thanks to the owners of the following libraries for their significant contributions to the JavaScript ecosystem related to Hangul and for inspiring many developers:
[hangul-js](https://github.com/e-/Hangul.js): Jae-min Jo
## License
MIT © Viva Republica, Inc. See [LICENSE](https://github.com/toss/es-hangul/blob/main/LICENSE) for details.