Skip to content

Latest commit

Β 

History

History
52 lines (30 loc) Β· 1.11 KB

README.md

File metadata and controls

52 lines (30 loc) Β· 1.11 KB

mugunghwa

🌺 무ꢁ화 μ½”λ“œ mugunghwa code ( kr base 72 )

무ꢁ화 μ½”λ“œλŠ” 10진법 숫자λ₯Ό ν•œκΈ€ 번호둜 λ³€ν™˜ν•΄μ£ΌλŠ” λͺ¨λ“ˆμž…λ‹ˆλ‹€. JSConf Korea λ°œν‘œλ₯Ό ν†΅ν•΄μ„œ 6μ›” 22일 졜초 κ³΅κ°œλ˜μ—ˆμŠ΅λ‹ˆλ‹€.

Install

npm install mugunghwa --save

Usage

무ꢁ화 μ½”λ“œλŠ” λ‹€μŒκ³Ό 같이 μ‚¬μš©ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

Encode

import mugunghwa from 'mugunghwa'
const encoded = mugunghwa.encode(`31252352334`)
console.log(`encoded: ${encoded}`)

Decode

import mugunghwa from 'mugunghwa'
const encoded = mugunghwa.encode(`31252352334`)
const decoded = mugunghwa.decode(encoded)

console.log(`encoded: ${encoded}`)
console.log(`decoded: ${decoded}`)

Is browser support?

λΈŒλΌμš°μ €μ—μ„œ μ‚¬μš©ν•  수 μžˆλŠ” λ°”λ‘œ 첨뢀가λŠ₯ν•œ μ½”λ“œλŠ” build 폴더 μ•ˆμ— mugunghwa.js μž…λ‹ˆλ‹€.

What exactly mugung.js

mugung.js λŠ” Big-Integer μ—°μ‚° λͺ¨λ“ˆμ΄ ν¬ν•¨λ˜μ–΄μ„œ μ—°μ‚°λ²”μœ„κ°€ λŠ˜μ–΄λ‚œ λ²„μ „μž…λ‹ˆλ‹€. λ§Œμ•½ 1000얡을 λ„˜λŠ” λ²”μœ„λ₯Ό κ³„μ‚°ν•΄μ•Όν•˜λŠ” 경우 mugung.js λͺ¨λ“ˆμ„ μ‚¬μš©ν•΄μ£Όμ„Έμš”.

License

MIT Licensed.