fetch-undici
Version:
Isomorphic exports of fetch from window and unduci
12 lines (8 loc) • 308 B
JavaScript
const native = globalThis?.fetch != null
exports.native = native
const fetchSource = native ? globalThis : require('undici')
exports.fetch = fetchSource?.fetch
exports.Headers = fetchSource?.Headers
exports.Response = fetchSource?.Response
exports.Request = fetchSource?.Request
exports.type = 'node.cjs'