Skip to content

Instantly share code, notes, and snippets.

@e-river
Created February 19, 2014 02:10
Show Gist options
  • Save e-river/9084810 to your computer and use it in GitHub Desktop.
Save e-river/9084810 to your computer and use it in GitHub Desktop.
if (!window.namespace) {
var namespace = {};
}
(function(namespace){
namespace.FunctionName = function(){
this.load();
};
namespace.FunctionName.prototype.load = function() {
// Do Something
};
return new namespace.FunctionName();
})(window, namespace);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment