main
Last change
on this file since 65b6638 was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.0 KB
|
Rev | Line | |
---|
[d24f17c] | 1 | import { fetch as fetchU, Headers as HeaderU, Request as RequestU, Response as ResponseU, FormData as FormDataU, File as FileU, Blob as BlobU } from './fetch-ponyfill-undici.node.js';
|
---|
| 2 | import { fetch as fetchNF, Headers as HeadersNF, Request as RequestNF, Response as ResponseNF, FormData as FormDataNF, File as FileNF, Blob as BlobNF } from './fetch-ponyfill-node-fetch.node.js';
|
---|
| 3 | if (typeof globalThis.fetch === 'undefined') {
|
---|
| 4 | globalThis.fetch = fetchU || fetchNF;
|
---|
| 5 | }
|
---|
| 6 | if (typeof globalThis.Headers === 'undefined') {
|
---|
| 7 | globalThis.Headers = HeaderU || HeadersNF;
|
---|
| 8 | }
|
---|
| 9 | if (typeof globalThis.Request === 'undefined') {
|
---|
| 10 | globalThis.Request = RequestU || RequestNF;
|
---|
| 11 | }
|
---|
| 12 | if (typeof globalThis.Response === 'undefined') {
|
---|
| 13 | globalThis.Response = ResponseU || ResponseNF;
|
---|
| 14 | }
|
---|
| 15 | if (typeof globalThis.FormData === 'undefined') {
|
---|
| 16 | globalThis.FormData = FormDataU || FormDataNF;
|
---|
| 17 | }
|
---|
| 18 | if (typeof globalThis.File === 'undefined') {
|
---|
| 19 | globalThis.File = FileU || FileNF;
|
---|
| 20 | }
|
---|
| 21 | if (typeof globalThis.Blob === 'undefined') {
|
---|
| 22 | globalThis.Blob = BlobU || BlobNF;
|
---|
| 23 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.