Skip to content

Instantly share code, notes, and snippets.

@tmcw
Created November 11, 2014 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmcw/88bec219c7bf386cde44 to your computer and use it in GitHub Desktop.
Save tmcw/88bec219c7bf386cde44 to your computer and use it in GitHub Desktop.
Gist from mistakes.io
'-.-- --- ..-\
/..- -. -.. . .-. ... - .- -. -../ \
-- --- .-. ... ./\
-.-. --- -.. . .-.-.-'
.split('/')
.map(function(s) {
return s.split(' ').map(function(s) {
return String.fromCharCode(97 + [
'.-', '-...', '-.-.', '-..',
'.', '..-.', '--.', '....',
'..', '.---', '-.-', '.-..',
'--', '-.', '---', '.--.',
'--.-', '.-.', '...', '-',
'..-', '...-', '.--', '-..-', '-.--', '--..']
.indexOf(s));
}).join('');
}).join(' ');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment