Socket
Socket
Sign inDemoInstall

@ambassify/fetch

Package Overview
Dependencies
9
Maintainers
3
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @ambassify/fetch

Load unfetch or node-fetch depending on use-case


Version published
Weekly downloads
36
decreased by-7.69%
Maintainers
3
Install size
606 kB
Created
Weekly downloads
 

Readme

Source

fetch

Loads the prefered Fetch API for the environment.

Based on the unfetch polyfill.

Usage

npm install --save @ambassify/fetch
const fetch = require('@ambassify/fetch');

Environments

Browser

The browser will load either the native implementation on window.fetch or unfetch.

NodeJS

NodeJS will attempt to retrieve global.fetch, if that is missing it will check if we are actually using node by checking existenc of process global.

If process is not defined unfetch will be loaded, otherwise node-fetch will be loaded.

Contribute

We really appreciate any contribution you would like to make, so don't hesitate to report issues or submit pull requests.

License

This project is released under a MIT license.

About us

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

Keywords

FAQs

Last updated on 03 Feb 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc