Author: | hustcc |
---|---|
Views Total: | 525 views |
Official Page: | Go to website |
Last Update: | January 18, 2017 |
License: | MIT |
Preview:

Description:
xmorse is a pure JavaScript based Morse code translator for both Node.js and Browser. It allows the user to decode and encode user typed Morse code with Unicode support.
How to use it:
Install the xmorse via NPM.
npm install xmorse
Import the xmorse into your project.
var xmorse = require('xmorse'); //or import xmorse from 'xmorse';
Or directly include the JavaScript file xmorse.min.js on the html page.
<script src="/path/to/xmorse.min.js"></script>
Encode the Morse code:
xmorse.encode('Hello, Xmorse!');
Decode the Morse code:
xmorse.decode('...././.-../.-../---/--..--/-..-/--/---/.-./..././-.-.--');