You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
816 B
31 lines
816 B
|
2 years ago
|
'use strict';
|
||
|
|
|
||
|
|
const abortController = require('./shared/node-fetch-native.dfc63e20.cjs');
|
||
|
|
require('node:fs');
|
||
|
|
require('node:path');
|
||
|
|
require('node:http');
|
||
|
|
require('node:https');
|
||
|
|
require('node:zlib');
|
||
|
|
require('node:stream');
|
||
|
|
require('node:buffer');
|
||
|
|
require('node:util');
|
||
|
|
require('node:url');
|
||
|
|
require('node:net');
|
||
|
|
|
||
|
|
function polyfill(name, impl) {
|
||
|
|
if (!(name in globalThis)) {
|
||
|
|
try {
|
||
|
|
globalThis[name] = impl;
|
||
|
|
} catch {
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
polyfill("fetch", abortController.fetch);
|
||
|
|
polyfill("Blob", abortController._Blob);
|
||
|
|
polyfill("File", abortController.File);
|
||
|
|
polyfill("FormData", abortController.FormData);
|
||
|
|
polyfill("Headers", abortController.Headers);
|
||
|
|
polyfill("Request", abortController.Request);
|
||
|
|
polyfill("Response", abortController.Response);
|
||
|
|
polyfill("AbortController", abortController.AbortController);
|