版博士V2.0程序
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

26 righe
781 B

  1. "use strict";
  2. // ref: https://github.com/tc39/proposal-global
  3. var getGlobal = function () {
  4. // the only reliable means to get the global object is
  5. // `Function('return this')()`
  6. // However, this causes CSP violations in Chrome apps.
  7. if (typeof self !== 'undefined') { return self; }
  8. if (typeof window !== 'undefined') { return window; }
  9. if (typeof global !== 'undefined') { return global; }
  10. throw new Error('unable to locate global object');
  11. }
  12. var globalObject = getGlobal();
  13. module.exports = exports = globalObject.fetch;
  14. // Needed for TypeScript and Webpack.
  15. if (globalObject.fetch) {
  16. exports.default = globalObject.fetch.bind(globalObject);
  17. }
  18. exports.Headers = globalObject.Headers;
  19. exports.Request = globalObject.Request;
  20. exports.Response = globalObject.Response;