mnemonic-number-kr
숫자를 외우기 쉬운 한국어 단어로 변환, Converts numbers to predefined list of Korean words
설치 (Installation)
npm install mnemonic-number-kr
사용법 (Usage)
기본 사용법 (Default usage)
let mnum_basic = ; mnum_basic;
배열 순서 섞기 (Shuffle array)
배열은 기본적으로 가나다순으로 정렬이 되있기에, 이를 무시하기 위해 배열을 섞는 방법
seed
에 관한 자세한 내용은 https://github.com/webcaetano/shuffle-seed 참고
let mnum_shuffled = shuffle: 'Any shuffle seed' // 아무 문자열이나 가능; mnum_shuffled;
출력 포멧 (Output format)
출력 포멧에 따라서 단어를 어떤식으로 사용할지 결정합니다. 예를 들면 [word]
일 경우 한 단어만을 사용하게되어 35,304개의 경우의 수 밖에 없지만, [word]-[word]
와 같이 두 개의 단어를 사용하게되면 총 1,246,372,416개의 표현이 가능해집니다.
let mnum_single_word = dictionaries: 'test.txt' ; mnum_single_word; let mnum_double_word = dictionaries: 'test.txt' 'test.txt' ; mnum_double_word;
경우의 수 주의 (Caution)
예상된 경우의 수보다 더 큰 숫자를 변환할 경우, 다시 복구할때 데이터 손실이 일어날 수 있습니다. If you use larger number than the available combinations, you will lose the actual number data.
let mnum = dictionaries: 'test.txt' ; mnum;