korean-stroke
v1.1.2
Published
한글의 획수를 계산해주는 NPM 패키지
Downloads
4
Maintainers
Readme
korean-stroke
- korean-stroke는 한글 문자열의 획수를 계산해주는 JavaScript 라이브러리입니다.
- korean-stroke is a JavaScript library for calculating the total stroke count of Korean characters in a string.
Installation
npm install korean-stroke
Usage
const strokeCounter = require('korean-stroke');
console.log(strokeCounter('안녕')); // 11
OR
import strokeCounter from 'korean-stroke'
console.log(strokeCounter('안녕')); // 11
Note: The strokeCounter
function calculates the stroke count for Korean characters only. Any non-Korean characters in the input string will not be counted towards the total stroke count.
API
strokeCounter(string)
- Parameters
string
(String): The Korean string to calculate.
- Returns
- (Number): A total stroke count of the input string.
License
This project is provided under the MIT License.