1 | const fetchNode = require('./node-ponyfill')
|
2 |
|
3 | if (!global.fetch) {
|
4 | const fetch = fetchNode.fetch.bind({})
|
5 |
|
6 | global.fetch = fetch
|
7 | global.fetch.polyfill = true
|
8 | global.Response = fetchNode.Response
|
9 | global.Headers = fetchNode.Headers
|
10 | global.Request = fetchNode.Request
|
11 | }
|