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

convert-slow-api

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

convert-slow-api - npm Package Compare versions

Comparing version 1.0.10 to 1.0.11

14

dist/fetcher.js

@@ -68,11 +68,11 @@ "use strict";

case 0:
config = __assign({ optimized: true, interval: 1000, errorHandler: error_handler_1.default() }, conf);
config = __assign({ optimized: true, interval: 1000, getConfig: {
timeout: 10 * 1000
}, postConfig: {}, errorHandler: error_handler_1.default() }, conf);
if (!!config.optimized) return [3 /*break*/, 2];
return [4 /*yield*/, exports.axios.post(url, params)];
return [4 /*yield*/, exports.axios.post(url, params, config.postConfig)];
case 1:
res = _b.sent();
return [2 /*return*/, res.data];
case 2: return [4 /*yield*/, exports.axios.post(url, params, {
params: { optimized: 'true' }
})];
case 2: return [4 /*yield*/, exports.axios.post(url, params, __assign(__assign({}, config.postConfig), { params: { optimized: 'true' } }))];
case 3:

@@ -90,5 +90,3 @@ id = (_b.sent()).data.id;

_b.trys.push([6, 8, , 9]);
return [4 /*yield*/, exports.axios.get(url, {
params: { id: id },
})];
return [4 /*yield*/, exports.axios.get(url, __assign(__assign({}, config.getConfig), { params: { id: id } }))];
case 7:

@@ -95,0 +93,0 @@ _a = (_b.sent()).data, result = _a.result, error = _a.error, finished = _a.finished;

{
"name": "convert-slow-api",
"version": "1.0.10",
"version": "1.0.11",
"description": "",

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

@@ -14,2 +14,6 @@ import Axios from "axios"

interval: 1000,
getConfig: {
timeout: 10 * 1000
},
postConfig: {},
errorHandler: getErrorHandle(),

@@ -19,6 +23,7 @@ ...conf,

if (!config.optimized) {
let res = await axios.post(url, params)
let res = await axios.post(url, params, config.postConfig)
return res.data
}
let { data: { id } } = await axios.post(url, params, {
...config.postConfig,
params: { optimized: 'true' }

@@ -31,2 +36,3 @@ })

let { data: { result, error, finished } } = await axios.get(url, {
...config.getConfig,
params: { id },

@@ -33,0 +39,0 @@ })

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