source: node_modules/swagger-client/lib/helpers/fetch-polyfill.node.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 1.1 KB
Line 
1"use strict";
2
3var _fetchPonyfillUndiciNode = require("./fetch-ponyfill-undici.node.js");
4var _fetchPonyfillNodeFetchNode = require("./fetch-ponyfill-node-fetch.node.js");
5if (typeof globalThis.fetch === 'undefined') {
6 globalThis.fetch = _fetchPonyfillUndiciNode.fetch || _fetchPonyfillNodeFetchNode.fetch;
7}
8if (typeof globalThis.Headers === 'undefined') {
9 globalThis.Headers = _fetchPonyfillUndiciNode.Headers || _fetchPonyfillNodeFetchNode.Headers;
10}
11if (typeof globalThis.Request === 'undefined') {
12 globalThis.Request = _fetchPonyfillUndiciNode.Request || _fetchPonyfillNodeFetchNode.Request;
13}
14if (typeof globalThis.Response === 'undefined') {
15 globalThis.Response = _fetchPonyfillUndiciNode.Response || _fetchPonyfillNodeFetchNode.Response;
16}
17if (typeof globalThis.FormData === 'undefined') {
18 globalThis.FormData = _fetchPonyfillUndiciNode.FormData || _fetchPonyfillNodeFetchNode.FormData;
19}
20if (typeof globalThis.File === 'undefined') {
21 globalThis.File = _fetchPonyfillUndiciNode.File || _fetchPonyfillNodeFetchNode.File;
22}
23if (typeof globalThis.Blob === 'undefined') {
24 globalThis.Blob = _fetchPonyfillUndiciNode.Blob || _fetchPonyfillNodeFetchNode.Blob;
25}
Note: See TracBrowser for help on using the repository browser.