Skip to content

Instantly share code, notes, and snippets.

@bahamat
Forked from bahamas10/quine.js
Last active August 29, 2015 14:19
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 bahamat/ffcfa210353df2a9b22a to your computer and use it in GitHub Desktop.
Save bahamat/ffcfa210353df2a9b22a to your computer and use it in GitHub Desktop.
#!/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