Skip to content

Instantly share code, notes, and snippets.

@patrickandre
Forked from founddrama/module.js
Created October 12, 2012 14:26
Show Gist options
  • Save patrickandre/3879437 to your computer and use it in GitHub Desktop.
Save patrickandre/3879437 to your computer and use it in GitHub Desktop.
window.NR = window.NR || {};
window.NR.myModule = (function () {
"use strict";
function initialize() {
// your initialization code here
}
function anotherMethod() {
// its function body here
}
return {
myVariable: "foo",
initialize: initialize,
anotherMethod: anotherMethod
};
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment