Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

myfetchapi

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

myfetchapi - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

2

dist/index.js

@@ -45,3 +45,3 @@ "use strict";

async function myFetch(input, init = {}, options) {
const maxRetry = options?.maxRetry || 3;
const maxRetry = options?.maxRetry === void 0 ? 3 : options.maxRetry === null ? 0 : options.maxRetry;
return new Promise((resolve, reject) => {

@@ -48,0 +48,0 @@ const executeRequest = async (retryCount) => {

{
"name": "myfetchapi",
"version": "1.3.0",
"version": "1.4.0",
"description": "mFetch is a JavaScript library that provides a utility function for making HTTP requests with queuing and retry functionality.",

@@ -5,0 +5,0 @@ "type": "commonjs",

@@ -22,3 +22,7 @@ # myfetchapi

// Make a request
myFetch("https://example.com/api/data", { method: "GET" }, { maxRetry: 3 })
myFetch(
"https://example.com/api/data",
{ method: "GET" },
{ maxRetry: 5 /* default is 3. To disable retries, set it to `null` or `0` */ }
)
.then((response) => console.log(response))

@@ -25,0 +29,0 @@ .catch((error) => console.error(error));

Sorry, the diff of this file is not supported yet

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