Created
September 12, 2013 13:32
-
-
Save forforf/6537377 to your computer and use it in GitHub Desktop.
Javascript Library Template
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
window.FooFoo = (function () { | |
//Private Functions & Classes | |
function notExposed () { /* internal library logic */ } | |
//Public Exposed Object | |
var FooFoo = { | |
//publicly available as FooFoo.static | |
static: "Some static value", | |
doSomething: function () { ... publicly available as FooFoo.doSomething ... } | |
}; | |
//Initialization function (optional) | |
function init () { /* do initial setup */} | |
return FooFoo; | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment