Created
January 9, 2015 05:27
-
-
Save Calvein/409c44b2710df8d69bae to your computer and use it in GitHub Desktop.
Generate readable string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
generateTitle = -> | |
v = 'aeiouy' | |
c = 'bcdfghjklmnpqrstvwxz' | |
text = '' | |
for i in [0..6] | |
group = if i % 2 then v else c | |
letter = group.charAt(Math.floor(Math.random() * group.length)) | |
if i is 0 | |
letter = letter.toUpperCase() | |
text += letter | |
return text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment