inko
v1.1.2
Published
영타를 한글로 쳤을 때, 혹은 한타를 영어로 변환해주는 기능을 가진 자바스크립트 오픈소스 라이브러리입니다.
Maintainers
Readme
Getting Started
- 영타를 한글로 쳤을 때, 혹은 한타를 영어로 변환해주는 기능을 가진 자바스크립트 오픈소스 라이브러리입니다.
- Inko Offical Website has been launched!
- Inko 한영타변환기 Chrome Extension has been launched! (2019.03.25)
- inko.py has been launched! (2020.04.29) (Thanks to JackCme)
- inko.kt has been launched! (2020.07.19) (Thanks to kimcore)
Release Note
See CHANGELOG.md for maintenance releases and upgrade notes.
| Version | Release Date | Changes | Contributors |
| ------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------- |
| v1.0.3 | 2018.08.07 | #7 영타 -> 한글로 변환 시켜주는 로직 수정. 알파벳 소문자 26개, 대문자 26개 총 52개에 맞춰서 한글과 매핑함. | 738 |
| v1.0.4 | 2018.08.11 | #4 Gulp로 workflow 자동화 (inko.min.js 파일 생성), #8 Bower에 라이브러리 등록 | 738 |
| v1.0.5 | 2018.08.11 | inko.js에서 package.json 파일을 import하는 부분 제거 | 738 |
| v1.0.6 | 2018.08.25 | #12 hlhlhl -> ㅚㅗㅣㅗㅣ로 변환되는 버그 수정, #14 rtk -> ꦵ로 변환되는 버그 수정, #15 복자음 가능 여부 옵션화, config 함수 추가 | algoshipda, 738 |
| v1.0.7 | 2019.04.21 | #22 is한글 함수에서 "가" ~ "긯" 범위를 한글로 인식하지 않는 버그 수정 | 738, EntryDark |
| v1.1.0 | 2019.04.22 | #6 index.d.ts 지원, #21 circleci 연동 | 738 |
| v1.1.1 | 2019.07.31 | 홈페이지 주소 변경 (https://inko.js.org), npm 다운로드 배지 추가 | 738 |
Installation
npm
npm install inkoyarn
yarn add inkoAs Browser module
CDN
<script src="https://cdn.jsdelivr.net/npm/[email protected]/inko.min.js"></script>Bower
bower install inkoUsage
var Inko = require('inko');
var inko = new Inko();
// ES6
import Inko from 'inko';
let inko = new Inko();영어 → 한글
inko.en2ko('dkssudgktpdy tptkd!');
// 안녕하세요 세상!한글 → 영어
inko.ko2en('ㅗ디ㅣㅐ 재깅!');
// hello world!복자음 가능 여부 설정
// allowDoubleConsonant의 기본값은 false입니다
var option = {
allowDoubleConsonant: true,
};설정을 부여하는 방법은 아래의 세 가지 방법으로 지원합니다.
- 인스턴스 생성할 때 생성자의 인자로 설정 부여
var inko = new Inko(option);config함수로 설정 부여
inko.config(option);en2ko함수의 인자로 설정 부여
inko.en2ko('rtrt', option);
// output: ㄳㄳ
inko.en2ko('rtrt', { allowDoubleConsonant: false });
// output: ㄱㅅㄱㅅTypeScript
The package includes type declarations for CommonJS and ES module consumers.
import Inko, { type InkoOption } from 'inko';
const options: InkoOption = { allowDoubleConsonant: true };
const inko = new Inko(options);For CommonJS TypeScript projects without esModuleInterop, use import Inko = require('inko').
Callbacks
Conversion methods keep their instance configuration when used as callbacks:
const { ko2en } = new Inko();
['안녕', 'ㄻㄳ'].map(ko2en); // ['dkssud', 'fart']Supported keyboard layout
Inko converts the standard Korean two-set (두벌식) keyboard layout. Three-set (세벌식) support is tracked in #11.
Shifted consonants retain their original key mapping: ㅉㅈ. becomes Ww.. Inko does not guess whether the intended text was www.; that enhancement is tracked in #23.
Development
Use Node.js 22 or newer and npm to work on the library:
npm ci
npm run verifyverify runs conversion tests, rebuilds the browser bundle, and checks the packed npm artifact with CommonJS, ES modules, TypeScript, browser, AMD, and Web Worker consumers. The runtime library has no dependencies.
See the release guide for publishing instructions.
Related
- inko-cli - Use inko on the command line
- inko-web - Inko official website
- inko-chrome-extension - Inko chrome extension
- alfred-inko - Alfred 3 workflow to convert misspelled English characters into Korean letters (& vice versa)
- inko.py - Python implementation of inko.js
- inko.kt - Kotlin implementation of inko.js (Also works in Java)
Contributors
| 738 (Jon Jee) | algoshipda | ahnsv | hyoungsp | joonghyeob-shin | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Contributing
이 오픈소스 프로젝트에 누구나 기여할 수 있습니다. 기여하고 싶은 분들은 이 레포지토리를 포크한 후 풀리퀘스트 요청해주세요!
License
Inko.js is released under the MIT License. See LICENSE file for details.
