This is a tool that converts 'Text' and 'Morse cord' to each other.
テキストとモールス信号のコードを相互に変換するツール.
npm install morse-jp
var MorseJp = require('../lib/morse-jp');
var morse = new MorseJp();
console.log(morse.word2morse('こんにちわ'));
// ---- .-.-. -.-. ..-. -.-
console.log(morse.morse2word('.-- --.--'));
// やあ
console.log(morse.morse2word('ああああ〜♥あ♥あ♥〜あ♥あ♥〜♥♥あ♥〜あ♥あ', {dash: 'あ', dot: '♥', separate: '〜'}));
// こんにちわ
console.log(morse.word2morse('おれがいる', {dash: 'それ', dot: 'ある', separate: '〜'}));
// あるそれあるあるある〜それそれそれ〜あるそれあるある〜あるある〜あるそれ〜それあるそれそれある
# watch
npm run watch
# build
npm run build
# test
npm test
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
MIT