manifold/functions/src/fetch.ts
2021-12-17 20:13:20 -06:00

10 lines
141 B
TypeScript

let fetchRequest: typeof fetch
try {
fetchRequest = fetch
} catch {
fetchRequest = require('node-fetch')
}
export default fetchRequest