morse-converter
v1.2.0
Published
A Morse code encoding and decoding library with support for Latin characters, numbers and punctuation
Downloads
8
Readme
morse-converter
A Morse code encoding and decoding library with support for Latin characters, numbers and punctuation.
Installation
$ npm install morse-converter
Usage
const morse = require("morse-converter");
const encoded = morse.encode("Morse");
// -- --- .-. ... .
const decoded = morse.decode("-.-. --- -.. .");
// CODE
const custom = morse.encode("is great! ñ", {
dot: "o",
dash: "a",
space: "_",
separator: "|",
unknown: "#"
});
// oo|ooo|_|aao|oao|o|oa|a|aoaoaa|_|#
Documentation
Check out the documentation here.
Contributing
Pull requests are welcome. For major changes, open an issue first to discuss what you would like to change.
License
Released under the MIT license.