morse.ahk

0.1.0 • Public • Published

#morse

A simple Morse code library for AutoHotkey

Installation

In a terminal or command line:

npm install morse.ahk

In your code only export.ahk needs to be included:

#Include %A_ScriptDir%\node_modules
#Include morse.ahk\export.ahk

morse := new morse()
result := morse.decode("..-. --- --- ....... -... .- .-.")
; => "foo bar"

API

.encode(value)

Encodes and returns a given string or array

encoded := morse.encode("Hello, world.")
; => ".... . .-.. .-.. --- --..-- ....... .-- --- .-. .-.. -.. .-.-.-"

encoded := morse.encode(["hello", "world"])
; => [".... . .-.. .-.. ---", ".-- --- .-. .-.. -.."]

.decode(value)

Decodes and returns a string or array

morse.decode(".... . .-.. .-.. --- --..-- ....... .-- --- .-. .-.. -.. .-.-.-");
; => HELLO, WORLD.

morse.decode([".... . .-.. .-.. ---", ".-- --- .-. .-.. -.."]);
; => [ "HELLO", "WORLD" ]

attributes

morse.dict

An object containing morse: character translations

Readme

Keywords

Package Sidebar

Install

npm i morse.ahk

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

7.57 kB

Total Files

4

Last publish

Collaborators

  • chunjee