manifold/functions/src/fetch.ts

10 lines
141 B
TypeScript
Raw Normal View History

2021-12-18 02:12:58 +00:00
let fetchRequest: typeof fetch
try {
fetchRequest = fetch
} catch {
fetchRequest = require('node-fetch')
}
export default fetchRequest