Skip to content

parkr/morsecode.ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Morsecode.js in TypeScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published