code: function (result) {
      // update status
      me.resolved = true;
      me.rejected = false;
      me.pending = false;
  
      _onSuccess.forEach(function (fn) {
        fn(result);
      });
  
      _process = function (onSuccess, onFail) {
        onSuccess(result);
      };
  
      _resolve = _reject = function () { };
  
      return me;
    }
docs: Resolve the promise
  @param {*} result
  @type {Function}