Do you have anything in your roadmap regarding Node.js support?
The purpose is to allow other cross-env libraries to use fetch as the client.
From what I see now in master there are couple of things to be done:
- Use
XMLHttpRequest polyfill (for example https://github.com/pwnall/node-xhr2)
- Wrap the code in something like UMD to make sure CommonJS and AMD compatibility
- Export all classes and
fetch() function instead of always writing to global
- Add optional
polyfill() method just like in es6-promise for AMD users
- Take over NPM package name
fetch, current one is unmaintained for 2 years
Is it worth investigation and making a PR? Does not seem to be too much effort.
Do you have anything in your roadmap regarding Node.js support?
The purpose is to allow other cross-env libraries to use
fetchas the client.From what I see now in
masterthere are couple of things to be done:XMLHttpRequestpolyfill (for example https://github.com/pwnall/node-xhr2)fetch()function instead of always writing to globalpolyfill()method just like ines6-promisefor AMD usersfetch, current one is unmaintained for 2 yearsIs it worth investigation and making a PR? Does not seem to be too much effort.