Skip to content

Instantly share code, notes, and snippets.

@remluben
Last active August 29, 2015 14:26
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 remluben/0842784872384d437691 to your computer and use it in GitHub Desktop.
Save remluben/0842784872384d437691 to your computer and use it in GitHub Desktop.
/**
* Module pattern draft
**/
// application namespace setup
var app = app || {};
app.modules = app.modules || {};
app.modules.myModule = (function () {
var that = {}, // public symbols, all variables an methods added are accessible using (app.modules.myModule.<functionName>)
priv = {}; // private symbols, not accessible from outside the module function
that.init = function () {
// setup
};
return that;
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment