Urara-Blog/node_modules/.pnpm-store/v3/files/5a/01da649570168bd5aca57249a2b3c735ecb27e6463ccb7c7c3494e1a1d0d12fd9f053157b435cff451cee2d9da5364c5a6c72e91bf97ebeeeca436b466cff2
2022-08-14 01:14:53 +08:00

25 lines
No EOL
732 B
Text

"use strict";
// ref: https://github.com/tc39/proposal-global
var getGlobal = function () {
// the only reliable means to get the global object is
// `Function('return this')()`
// However, this causes CSP violations in Chrome apps.
if (typeof self !== 'undefined') { return self; }
if (typeof window !== 'undefined') { return window; }
if (typeof global !== 'undefined') { return global; }
throw new Error('unable to locate global object');
}
var global = getGlobal();
module.exports = exports = global.fetch;
// Needed for TypeScript and Webpack.
if (global.fetch) {
exports.default = global.fetch.bind(global);
}
exports.Headers = global.Headers;
exports.Request = global.Request;
exports.Response = global.Response;