code: function _gpfRequireDefine(dependencies, factory) {
          var me = this, promises = [], keys = Object.keys(dependencies);
          _gpfArrayForEach(keys, function (key) {
              promises.push(_gpfRequireGet.call(me, _gpfRequireResolve.call(me, dependencies[key])));
          }, me);
          return Promise.all(promises).then(function (resources) {
              var result, require;
              if (typeof factory === "function") {
                  require = {};
                  _gpfArrayForEach(keys, function (key, index) {
                      require[key] = resources[index];
                  });
                  result = factory(require);
              } else {
                  result = factory;
              }
              return result;
          });
      }
docs: Defines a new module by executing the factory function with the specified dependent resources,
  see {@tutorial REQUIRE}
  
  
  @param {Object} dependencies Dictionary of dependencies, the keys are preserved while passing the result
  dictionary to the factory function
  @param {*} factory Can be either:
  * A factory function executed when all resources are resolved, the first parameter will be a dictionary
  with all dependencies indexed by their name (as initially specified in the dependencies parameter).
  The result of the factory function will be cached as the result of this resource
  * Any value that will be cached as the result of this resource
  @return {Promise<*>} Resolved with the factory function result or the object
  @since 0.2.2