src/libs/Module.js
function createInstance(sModuleId, aDependencies, fpCallback) {
  const oModules = getModules();
  if (isTypeOf(oModules[sModuleId], sNotDefined)) {
    fpThrowErrorModuleNotRegistered(sModuleId, true);
  }
  addPropertiesAndMethodsToModule(sModuleId, aDependencies, function (oInstance) {
    if (!getDebug()) {
      iterateObject(oInstance, function (oItem, sName) {
        if (isFunction(oItem)) {
          wrapMethod(oInstance, sName, sModuleId, oInstance[sName]);
        }
      });
    }
    fpCallback(oInstance);
  });
}
function createInstance(sModuleId, aDependencies, fpCallback) {
  const oModules = getModules();
  if (isTypeOf(oModules[sModuleId], sNotDefined)) {
    fpThrowErrorModuleNotRegistered(sModuleId, true);
  }
  addPropertiesAndMethodsToModule(sModuleId, aDependencies, function (oInstance) {
    if (!getDebug()) {
      iterateObject(oInstance, function (oItem, sName) {
        if (isFunction(oItem)) {
          wrapMethod(oInstance, sName, sModuleId, oInstance[sName]);
        }
      });
    }
    fpCallback(oInstance);
  });
}
createInstance is the method that will create the module instance and wrap the method if needed.
@param {String} sModuleId
@param {Array|undefined} [aDependencies]
@param {Function} fpCallback
@private