File size: 278 Bytes
77731d1
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
const fetchNode = require('./node-ponyfill')

if (!global.fetch) {
  const fetch = fetchNode.fetch.bind({})

  global.fetch = fetch
  global.fetch.polyfill = true
  global.Response = fetchNode.Response
  global.Headers = fetchNode.Headers
  global.Request = fetchNode.Request
}