1.1.1 • Published 10 months ago

driadi v1.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
10 months ago

Morse

Morse is a small js library to decode and encode messages in morse code. It's freely inspired on Huffman coding binary tree to encode and decode dot/dash strings. This tree is actually hard coded and permit to decode a morse string in at last 5 passages.

Usage

import morse from "driadi";

const encoded = morse.encode("What hath God wrought");
const decoded = morse.decode(encoded);

console.log(encoded, dedcoded);
// .-- .... .- -_.... .- - ...._--. --- -.._.-- .-. --- ..- --. .... -
// what hath god wrought

Notes

  • It is possible to encode/decode only alphanumeric signs (no punctuation).
  • Encoding algorithm is case-insensitive.
1.1.1

10 months ago

1.1.0

10 months ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.0

1 year ago