Load unfetch or node-fetch depending on use-case
npm install @ambassify/fetchBased on the unfetch polyfill.
sh
npm install --save @ambassify/fetch
`
Usage
`js
const fetch = require('@ambassify/fetch');
`
Environments
$3
The browser will load either the native implementation on window.fetch or unfetch.$3
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.