function Promise$1(executor) {
  this.state = PENDING;
  this.value = undefined;
  this.deferred = [];
  var promise = this;

  try {
    executor(function (x) {
      promise.resolve(x);
    }, function (r) {
      promise.reject(r);
    });
  } catch (e) {
    promise.reject(e);
  }
}
Promises/A+ polyfill v1.1.4 (https://github.com/bramstein/promis)