Allows direct promise to promise chaining (especially useful by a outside aggregating function).
Allows direct promise to promise chaining (especially useful by a outside aggregating function). It doesn't use the asynchronous resolve algorithm and so excepts only another Promise as it's argument.
the promise to chain
a new promise
Signifies that this promise was the last in a chain of then()s: if a handler passed to the call to then which produced this promise throws, the exception be rethrown.
Signifies that this promise was the last in a chain of then()s: if a handler passed to the call to then which produced this promise throws, the exception be rethrown. You can pass an OnReject handler to end so that exceptions will be handled (like a final catch clause); This method returns it's promise for easy use with return.
Fulfills the promise
Fulfills the promise
the given result
Called when the promise has been fulfilled.
Called when the promise has been fulfilled.
the callback
Called if the promise has been rejected.
Called if the promise has been rejected.
the callback
Called when the promise has been resolved.
Called when the promise has been resolved.
the callback
Rejects a promise with a reason
Rejects a promise with a reason
the given reason
Resolves the promise
Resolves the promise
the given reason
the optional arguments
Creates a new promise and returns it.
Creates a new promise and returns it. If onFulfill or onReject are passed, they are added as SUCCESS/ERROR callbacks to this promise after the nextTick.
the callback
mpromise - Promises A+ conformant implementation