Defining a constructor method name for the module
Module.config({
constructor: "initialize" // optional, default: init
});Module(namespace, moduleScope, dependencies)Creating a simple module attached with the namescape App.MyModule and with 2 dependencies (window and document object).
Module("App.MyModule",
function(global, doc) {
"use strict"
return {
init: init
}
function init() {
console.log("init");
}
},
[window, document]
);