New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@buttercup/fetch

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@buttercup/fetch

Fetch adapter for cross-platform use.

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
17K
increased by4.31%
Maintainers
2
Weekly downloads
 
Created
Source

Fetch

Fetch adapter for cross-platform use.

Buttercup npm (scoped) Tests

About

This library exports fetch in various environments, such as within a browser or under NodeJS:

  • Browsers get the native window.fetch
  • NodeJS gets node-fetch

This library was designed to be used primarily within Buttercup and its supporting libraries: Features and fixes implemented here will be oriented to furthering Buttercup's goals, and unnessarily changes may be rejected due to that.

Installation

For browser use you need only install this library:

npm install @buttercup/fetch --save-dev

For NodeJS use you must also install node-fetch:

npm install @buttercup/fetch node-fetch --save

Usage

You can import the various components related to fetch regardless of the entry your application uses:

import {
    fetch,
    Headers,
    Request,
    Response
} from "@buttercup/fetch";

// ...

const res = await fetch("https://...");

Keywords

FAQs

Package last updated on 12 Sep 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc