https://github.com/Syncthetic/MorseCode
JavaScript Library to encode and decode morse code.
https://github.com/Syncthetic/MorseCode
javascript library morse-code
Last synced: 6 months ago
JSON representation
JavaScript Library to encode and decode morse code.
- Host: GitHub
- URL: https://github.com/Syncthetic/MorseCode
- Owner: Syncthetic
- Created: 2017-02-03T16:59:04.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-03T18:42:14.000Z (almost 9 years ago)
- Last Synced: 2024-11-25T14:47:09.433Z (about 1 year ago)
- Topics: javascript, library, morse-code
- Language: JavaScript
- Size: 1.95 KB
- Stars: 7
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MorseCode
MorseCode is a JavaScript Library to handle the encoding and decoding process of morse code messages.
- Create an object to handle the encode/decode functions:
- `m = Object.create(MorseCode);`
- Encoding text into morse code:
- Syntax: `obj.encode('plain text')` or `obj.morse('plain text')`
- `m.encode('test message');`
- `m.morse('test message');`
- Decoding the morse code into plain text:
- Syntax: `obj.decode('morse code')` or `obj.morse('morse code', true)`
- `m.decode('.- -... -.-.');`
- `m.morse('.- -... -.-.', true);`
- Testing the MorseCode Object
- `MorseCode.test();`
- An object is not required to call functions
- `MorseCode.encode('some string');`
- `MorseCode.decode('.- -... -.-.');`
### TO DO
- Add the audio functionality to encoded messages