code: function createResolver () {
      var
        resolver = {
          settled: false,
          fulfilledValues: [],
          rejectedValues: []
        },
        promise = new Promise(function promiseResolver (fulfill, reject) {
          resolver.fulfill = fulfill;
          resolver.reject = reject;
        });
  
      promise.fulfilled = 0;
      promise.rejected = 0;
      promise.pending = 0;
      resolver.promise = promise;
  
      return resolver;
    }
docs: Creates a resolver object that keeps track of promise related values