lib/promise.js
function Promise(back) {
  this.emitter = new EventEmitter();
  this.emitted = {};
  this.ended = false;
  if ('function' == typeof back)
    this.onResolve(back);
}
function Promise(back) {
  this.emitter = new EventEmitter();
  this.emitted = {};
  this.ended = false;
  if ('function' == typeof back)
    this.onResolve(back);
}
function Promise ( back ) { this . emitter = new EventEmitter ( ) ; this . emitted = { } ; this . ended = false ; if ( 'function' == typeof back ) this . onResolve ( back ) ; }
Promise constructor.

_NOTE: The success and failure event names can be overridden by setting `Promise.SUCCESS` and `Promise.FAILURE` respectively._

@param {Function} back a function that accepts `fn(err, ...){}` as signature
@inherits NodeJS EventEmitter http://nodejs.org/api/events.html#events_class_events_eventemitter
@event `reject`: Emits when the promise is rejected (event name may be overridden)
@event `fulfill`: Emits when the promise is fulfilled (event name may be overridden)
@api public
Promise constructor .