morse-converter
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

morse-converter

NPM

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.

Readme

Keywords

Package Sidebar

Install

npm i morse-converter

Weekly Downloads

5

Version

1.2.0

License

MIT

Unpacked Size

6.91 kB

Total Files

7

Last publish

Collaborators

  • jaimermxd