lib/Promise.js
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;
  }
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;
  }
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 ; }
Resolve the promise
@param {*} result
@type {Function}
Resolve the promise