GitHunt
N3

n3mu3lw/morsecode

Encode and decode text using standard international Morse code

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

Languages

Nim100.0%

Contributors

Created June 23, 2025
Updated June 24, 2025
n3mu3lw/morsecode | GitHunt