Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Lukince/Hangul4deno
Browse files Browse the repository at this point in the history
  • Loading branch information
qluana7 committed Sep 30, 2021
2 parents 2928f0e + ca6fcde commit 04be788
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 2 deletions.
53 changes: 53 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<p align="center">
<span><i><b>The powerful hangul library</i></b></span>
<br><Br>
<img alt="GitHub" src="https://img.shields.io/github/license/Lukince/Hangul4deno">
<img alt="GitHub repo size" src="https://img.shields.io/github/repo-size/Lukince/Hangul4deno">
<img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/Lukince/Hangul4deno">
</p>

<i>Please check [README.md](https://github.com/Lukince/Hangul4deno/blob/master/README.md) on github if possible. it changes frequently.</i>

# Features

### Assemble, Disassemble Hangul

```ts
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**

```ts
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

```ts
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 : 안녕
```
4 changes: 2 additions & 2 deletions src/entities/assembler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ export class Assembler {
}

/**
* This will disassemble hanugl.
* This will disassemble hangul.
* @example Assembler.disassemble('안') // ['ㅇ','ㅏ','ㄴ']
* @param str The string value which want to disassemble
* @returns Disassembled hangul
*/
static disassemble(str: string): string[] {
return disassemble(str);
}
}
}

0 comments on commit 04be788

Please sign in to comment.