Skip to content

Instantly share code, notes, and snippets.

@minitech
Created May 28, 2013 21:27
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 minitech/5666294 to your computer and use it in GitHub Desktop.
Save minitech/5666294 to your computer and use it in GitHub Desktop.
(function a() {
/* (function(package) {
* (function(a) {
* "use strict";
* var a\u005f = package;
* with(a_)
* this && a();
* })(a);
* })();
*/
var code = "";
var match;
var re = /[ /]\* (.+)$/gm;
while(match = re.exec(a)) {
code += match[1];
}
try {
var package = {a: a};
eval(code);
} catch(ex) {
console.log(/SyntaxError: (.+)/.exec(ex.stack)[1]);
return;
} finally {
console.log(";-)");
}
})();
@brian-hannay
Copy link

https://gist.github.com/brian-hannay/5733214
Another what does it do... Interesting how you parse the function as a string :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment