Created
December 1, 2016 21:07
-
-
Save joeljuca/662067c4edc0be2af6c61388adfc41a5 to your computer and use it in GitHub Desktop.
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
module.exports = CodeMachine = function (coffee) { | |
if (coffee instanceof Coffee) { | |
throw new TypeError('CodeMachine needs coffee to work') | |
} | |
var linesOfCode = [] | |
for (var i = 0, end = Math.random() * 1000; i < end; i++) { | |
var line = [] | |
for (var j = 0; j < 5; j++) { | |
line.push(Math.random() * 78 + 48) | |
} | |
linesOfCode.push(line) | |
} | |
return linesOfCode.map(l => l.map(String.fromCharCode)).join('\n') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment