src/promise.js
function StateManager(options) {
    // Initial state is pending
    this.state = states.pending;

    // If a state is passed in, then we go ahead and initialize the state manager with it
    if (options && options.state) {
      this.transition(options.state, options.value, options.context);
    }
  }
function StateManager(options) {
    // Initial state is pending
    this.state = states.pending;

    // If a state is passed in, then we go ahead and initialize the state manager with it
    if (options && options.state) {
      this.transition(options.state, options.value, options.context);
    }
  }
function StateManager ( options ) { // Initial state is pending this . state = states . pending ; // If a state is passed in, then we go ahead and initialize the state manager with it if ( options && options . state ) { this . transition ( options . state , options . value , options . context ) ; } }
Provides a set of interfaces to manage callback queues and the resolution state
of the promises.
Provides a set of interfaces to manage callback queues and the resolution state of the promises .