Skip to content

Instantly share code, notes, and snippets.

@agundermann
Forked from FiNGAHOLiC/gist:1605851
Created May 26, 2013 20:46
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 agundermann/5653967 to your computer and use it in GitHub Desktop.
Save agundermann/5653967 to your computer and use it in GitHub Desktop.
JavaScript: Module
// http://speakerdeck.com/u/addyosmani/p/large-scale-javascript-application-architecture
function library(module){
$(function(){
if(module.init){
module.init();
};
});
return module;
};
var myLibrary = library(function(){
return{
init : function(){
/* implementation */
}
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment