mirror of
https://github.com/nemuelw/morsecode
synced 2026-01-02 06:14:49 +00:00
No description
| src | ||
| tests | ||
| .gitignore | ||
| morsecode.nimble | ||
| README.md | ||
morsecode
Encode and decode text using standard international Morse code
Setup
- Run this command in your project directory:
nimble install morsecode
Usage
Import the package
import morsecode
Encoding
# output: .... . .-.. .-.. --- .-- --- .-. .-.. -..
echo encode("HELLO WORLD)
Decoding
# output: HELLO WORLD
echo decode(".... . .-.. .-.. --- .-- --- .-. .-.. -..")
Tests
- To run tests, simply run this command:
nimble test