Skip to content

Instantly share code, notes, and snippets.

@formido
Created April 17, 2009 16:23
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 formido/97112 to your computer and use it in GitHub Desktop.
Save formido/97112 to your computer and use it in GitHub Desktop.
// Structure jsm file so EXPORTED_SYMBOLS are compressible
function test() {
// Just a test to make sure jsm files are initialized
// the way I assume, so state is updated properly
hello.what = "there";
var x = 5;
var y = 0;
var out = "";
let (x = x+10, y = 12) {
out = out + (x+y + "\n");
};
return out + ((x + y) + "\n");
}
function hello() {
var hello = {
what: "haha"
};
return this[arguments.callee.name] = hello;
}
var EXPORTED_SYMBOLS = [test.name, hello.name];
hello();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment