Last active
August 29, 2015 14:26
-
-
Save remluben/0842784872384d437691 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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