code: function wrappedFetch() {
    var wrappedPromise = {};
  
    var promise = new Promise(function (resolve, reject) {
      wrappedPromise.resolve = resolve;
      wrappedPromise.reject = reject;
    });
  
    var args = new Array(arguments.length);
  
    for (var i = 0; i < args.length; i++) {
      args[i] = arguments[i];
    }
  
    wrappedPromise.promise = promise;
  
    Promise.resolve().then(function () {
      return fetch.apply(null, args);
    }).then(function (response) {
      wrappedPromise.resolve(response);
    }).catch(function (error) {
      wrappedPromise.reject(error);
    });
  
    return wrappedPromise;
  }
docs: /* global fetch /* global Headers