0.0.1 • Published 10 years ago
morse-jp v0.0.1
morse-jp
This is a tool that converts 'Text' and 'Morse cord' to each other.
テキストとモールス信号のコードを相互に変換するツール.
Installation
npm install morse-jpExample
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: '〜'}));
// あるそれあるあるある〜それそれそれ〜あるそれあるある〜あるある〜あるそれ〜それあるそれそれあるDevelopment
# watch
npm run watch
# build
npm run build
# test
npm testContributing
- 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
License
MIT
0.0.1
10 years ago