Current section
Files
Jump to
Current section
Files
README.md
# Morsey
A package for encoding and decoding Morse code in Gleam.
<!--
[](https://hex.pm/packages/morse)
[](https://hexdocs.pm/morse/)
-->
## Usage
```gleam
import gleam/io
import morsey
let text = "Hello world!"
case morsey.encode(text) {
Ok(symbols) ->
io.println("The Morse code for " <> text <> " is " <> to_string(symbols))
Error(morsey.InvalidCharacter(char)) ->
io.println_error("Invalid character: " <> char)
}
```
## Development
```sh
gleam run # Run the project
gleam test # Run the tests
```