Skip to content

aguadecoco1301/to-morse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

to-morse

A node.js module to parse morse code

Usage

The usage is very easy. Try this:

let morse = require("to-morse")
console.log("Hello world".toMorse())
//#returns: .... . .-.. .-.. --- / .-- --- .-. .-.. -..

Limits

Actually, the module only can parse letters of the Spanish alphabet (English alphabet + "ñ").

But, ¡More symbols coming soon!

String.prototype.toMorse

The prototype has other three optional arguments, they are:

String.prototype.toMorse(e, t, undef)

e = "e" character, or ".". You can change it.
t = "t" character, or "-". You can change it too
undef = equals to a undefined character. Default is "?"

"hello~".toMorse("*", "°", "$")
//# returns: **** * *°** *°** °°° $
//# default: .... . .-.. .-.. --- ?

About

A node.js module to parse & stringify morse code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published