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

karl-common-util

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

karl-common-util - npm Package Compare versions

Comparing version 1.5.7 to 1.5.8

30

dist/http/index.js

@@ -237,10 +237,14 @@ "use strict";

}
//如果是浏览器,则自动识别跨域模式
if (isBrowser && mode === undefined && (url.startsWith("http://") || url.startsWith("https://"))) {
mode === "cors";
}
if (!(times > 0)) {
_context3.next = 19;
_context3.next = 20;
break;
}
_context3.prev = 2;
_context3.next = 5;
_context3.prev = 3;
_context3.next = 6;
return regeneratorRuntime.awrap(doFetch({

@@ -258,9 +262,9 @@ url: url,

case 5:
case 6:
response = _context3.sent;
return _context3.abrupt("return", response);
case 9:
_context3.prev = 9;
_context3.t0 = _context3["catch"](2);
case 10:
_context3.prev = 10;
_context3.t0 = _context3["catch"](3);

@@ -270,7 +274,7 @@ times--;

if (!(times > 0)) {
_context3.next = 18;
_context3.next = 19;
break;
}
_context3.next = 15;
_context3.next = 16;
return regeneratorRuntime.awrap(request({

@@ -290,9 +294,9 @@ url: url,

case 15:
case 16:
return _context3.abrupt("return", _context3.sent);
case 18:
case 19:
throw _context3.t0;
case 19:
case 20:
case "end":

@@ -302,3 +306,3 @@ return _context3.stop();

}
}, null, undefined, [[2, 9]]);
}, null, undefined, [[3, 10]]);
};

@@ -305,0 +309,0 @@

{
"name": "karl-common-util",
"version": "1.5.7",
"version": "1.5.8",
"description": "karl common lib for client and server",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -142,2 +142,7 @@ import "isomorphic-fetch"

}
//如果是浏览器,则自动识别跨域模式
if (isBrowser && mode === undefined && (url.startsWith("http://") || url.startsWith("https://"))) {
mode === "cors"
}
if (times > 0) {

@@ -144,0 +149,0 @@ try {

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