Skip to content

Instantly share code, notes, and snippets.

@gcoop
Created September 13, 2010 13:47
Show Gist options
  • Save gcoop/577297 to your computer and use it in GitHub Desktop.
Save gcoop/577297 to your computer and use it in GitHub Desktop.
var Application = window.Application || {}; // Creates a namespace called Application.
Application.Config = function () {
var instance = (function () {
var privateVar;
function privateMethod() {
return 'privateMethod';
}
return { // Public interface.
publicMethod: function () {
return privateMethod();
}
}
})();
Application.Config = function() {
return instance;
}
return Application.Config();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment