mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-04-22 06:47:57 +00:00
chore: update to version 14.0.11 and align website URLs
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { extractGlobal } from '@pezkuwi/x-global';
|
||||
export { packageInfo } from './packageInfo.js';
|
||||
const importFetch = import('node-fetch').catch(() => null);
|
||||
let modFn = null;
|
||||
async function nodeFetch(...args) {
|
||||
if (!modFn) {
|
||||
const mod = await importFetch;
|
||||
if (!mod?.default) {
|
||||
throw new Error('Unable to import node-fetch in this environment');
|
||||
}
|
||||
modFn = mod.default;
|
||||
}
|
||||
return modFn(...args);
|
||||
}
|
||||
export const fetch = /*#__PURE__*/ extractGlobal('fetch', nodeFetch);
|
||||
Reference in New Issue
Block a user