node-polyfill.js 278 B

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