File size: 267 Bytes
6655e35
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
const fetchNode = require('./node-ponyfill')
const fetch = fetchNode.fetch.bind({})

fetch.polyfill = true

if (!global.fetch) {
  global.fetch = fetch
  global.Response = fetchNode.Response
  global.Headers = fetchNode.Headers
  global.Request = fetchNode.Request
}