Loads the prefered Fetch API for the environment.
Based on the unfetch polyfill.
npm install --save @ambassify/fetch
const fetch = require('@ambassify/fetch');
The browser will load either the native implementation on window.fetch
or unfetch.
NodeJS will attempt to retrieve global.fetch
,
if that is missing it will check if we are actually using node by checking the existence of global process
.
If process
is not defined unfetch will be loaded, otherwise node-fetch will be loaded.
We really appreciate any contribution you would like to make, so don't hesitate to report issues or submit pull requests.
This project is released under a MIT license.
If you would like to know more about us, be sure to have a look at our website, or our Twitter accounts Ambassify, Sitebase, JorgenEvens.