morsecode
v1.0.0
Published
Turn your alphanumeric content into Morse code.
Downloads
13
Readme
morsecode.js
Cuz sometime you just want to speak in Morse Code with your best buds. Better do it in JavaScript.
Usage
Node.js
var MorseCode = require("./morsecode");
var morseConverter = new MorseCode();
morseConverter.translate("OMG HI");
// => "_ _ _ _ _ _ _ . . . . . . ."
Browser
(For this one, add the necessary script tag to morsecode.js
)
// MorseCode is autoloaded to window.MorseCode
var morseConverter = new MorseCode();
morseConverter.translate("OMG HI");
// => "_ _ _ _ _ _ _ . . . . . . ."
Tests
$ npm install -g jasmine-node
$ jasmine-node test
License
MIT, do basically whatever you want. By Parker Moore.