code: function getDefer() {
      let defer = {};
      defer.promise = new Promise(function (resolve, reject) {
          defer.resolve = resolve;
          defer.reject = reject;
      });
      return defer;
  }
docs: Generate a defer object,
  for example: {promise: new Promise()}
  @returns {*}