src/libs/Module.js
function getCallbackToSetObjectFromTemplate(oMethodsObject, oPropertiesObject) {
  return function (oValue, sKey) {
    if (typeof oValue === 'function') {
      oMethodsObject[sKey] = getSimpleFunction(oValue);
    } else if (isArray(oValue)) {
      oPropertiesObject[sKey] = copyArray(oValue);
    } else if (typeof oValue === 'object' && oValue !== null ) {
      oPropertiesObject[sKey] = simpleMerge({}, oValue);
    } else if (isInstanceOf(oValue, Date)) {
      oPropertiesObject[sKey] = new Date();
      oPropertiesObject[sKey].setTime(oValue.getTime());
    } else {
      oPropertiesObject[sKey] = oValue;
    }
  };
}
function getCallbackToSetObjectFromTemplate(oMethodsObject, oPropertiesObject) {
  return function (oValue, sKey) {
    if (typeof oValue === 'function') {
      oMethodsObject[sKey] = getSimpleFunction(oValue);
    } else if (isArray(oValue)) {
      oPropertiesObject[sKey] = copyArray(oValue);
    } else if (typeof oValue === 'object' && oValue !== null ) {
      oPropertiesObject[sKey] = simpleMerge({}, oValue);
    } else if (isInstanceOf(oValue, Date)) {
      oPropertiesObject[sKey] = new Date();
      oPropertiesObject[sKey].setTime(oValue.getTime());
    } else {
      oPropertiesObject[sKey] = oValue;
    }
  };
}
Sets properties and methods from a template object.
@param {Object} oMethodsObject
@param {Object} oPropertiesObject
@returns {Function}