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

@inrupt/universal-fetch

Package Overview
Dependencies
Maintainers
8
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@inrupt/universal-fetch

A library to access fetch from any JavaScript / TypeScript environment

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
170
increased by2.41%
Maintainers
8
Weekly downloads
 
Created
Source

Universal Fetch

@inrupt/universal-fetch is a TypeScript library for accessing the fetch method from any environment.

In browsers, this library will always re-export the existing fetch function from the global scope.

In Node.js environments, the library first checks if fetch is globally available (as is the case in Node 18, and is being back-ported into Node 16), then the global fetch is used. Otherwise, the fetch function exported by undici is used for Node 16, and node-fetch is used for Node 14-and-below.

Usage

import fetch, { Headers, Request, Response } from "@inrupt/universal-fetch";

const response = await fetch(url);

Changelog

See the release notes.

License

MIT © Inrupt

Keywords

FAQs

Package last updated on 08 Aug 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