Skip to content

qluana7/Hangul4deno

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hangul 4 deno

The powerful hangul library

GitHub GitHub repo size GitHub last commit

Please check README.md on github if possible. it changes frequently.

Features

Assemble, Disassemble Hangul

import { Assembler } from "https://deno.land/x/[email protected]/mod.ts"

const hello = Assembler.assemble(['ㅇ', 'ㅏ', 'ㄴ', 'ㄴ', 'ㅕ', 'ㅇ']);

console.log(hello); // log : 안녕

const dishello = Assembler.disassemble("안녕하세요");

Convert English to Korean, Korean to English

Note : This is not a translation. This'll assemble after converting according to the QWERTY keyboard

import { Hangul } from "https://deno.land/x/[email protected]/mod.ts"

console.log(Hangul.engToKor("dkssud tprP!"));
// log : 안녕 세계!

console.log(Hangul.korToEng("안녕 세계!"));
// log : dkssud tprP!

Build hangul with initial, neutral and final

import { HangulBuilder } from "https://deno.land/x/[email protected]/mod.ts"

const builder1 = new HangulBuilder();

builder1.setInitial('ㅇ');
builder1.setNeutral('ㅏ');
builder1.setFinal('ㄴ');

const builder2 = new HangulBuilder('ㄴ', 'ㅕ', 'ㅇ');

console.log([builder1.build(), builder2.build()].join(''));
// log : 안녕

Contributors

andjsrk