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

myfetchapi

Package Overview
Dependencies
Maintainers
0
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.7.3 to 1.7.4

19

dist/index.js
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;

@@ -20,10 +18,2 @@ var __export = (target, all) => {

};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

@@ -38,3 +28,2 @@

module.exports = __toCommonJS(src_exports);
var nfetch = __toESM(require("./nodeFetch"));
var MAX_CONCURRENT_REQUESTS = 500;

@@ -48,6 +37,7 @@ var currentRequests = 0;

try {
const httpFunc = options?.useNodeFetch ? nfetch.fetch : fetch;
const httpFunc = options?.useNodeFetch ? (await require("./nodeFetch.js")).fetch : fetch;
const res = await httpFunc(input, init);
const isOkay = options?.retryCondition ? await options.retryCondition(res) : res.ok;
if (isOkay) return { success: true, res };
if (isOkay)
return { success: true, res };
return {

@@ -99,3 +89,4 @@ success: false,

const nextRequest = queue.shift();
if (nextRequest) nextRequest();
if (nextRequest)
nextRequest();
}

@@ -102,0 +93,0 @@ }

{
"name": "myfetchapi",
"version": "1.7.3",
"version": "1.7.4",
"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",

@@ -0,0 +0,0 @@ # myfetchapi

@@ -0,0 +0,0 @@ {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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