Created
March 4, 2015 16:24
-
-
Save bahamas10/c7a7f30eb6721ce308c1 to your computer and use it in GitHub Desktop.
node quine
This file contains hidden or 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
#!/usr/bin/env node | |
var util = require("util"); | |
var source = [ | |
'#!/usr/bin/env node', | |
'', | |
'var util = require("util");', | |
'', | |
'var source = [', | |
'];', | |
'', | |
'var q = String.fromCharCode(39);', | |
'source.map(function(l, i) {', | |
' console.log(l);', | |
' if (i === 4)', | |
' source.forEach(function(_l) {', | |
' console.log("%s%s%s,", q, _l, q);', | |
' });', | |
'});', | |
]; | |
var q = String.fromCharCode(39); | |
source.map(function(l, i) { | |
console.log(l); | |
if (i === 4) | |
source.forEach(function(_l) { | |
console.log("%s%s%s,", q, _l, q); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment