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

axios-patch

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

axios-patch - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

13

index.js

@@ -10,7 +10,5 @@ 'use strict';

globalAxios.interceptors.response.use(res => {
delete res.config[contextKey];
return res;
}, err => {
let stackFromOrigin = err.config[contextKey] && err.config[contextKey].stack;
globalAxios.interceptors.response.use(undefined, err => {
const context = err.config && err.config[contextKey];
let stackFromOrigin = context && context.stack;
if (stackFromOrigin) {

@@ -25,3 +23,2 @@ if (err.stack) {

}
delete err.config[contextKey];
return Promise.reject(err);

@@ -72,3 +69,3 @@ });

Object.entries(methodMap).forEach(function (kv) {
var method = kv[0], reqConfIdx = kv[1];
const method = kv[0], reqConfIdx = kv[1];
if (typeof axios[method] !== 'function') {

@@ -85,3 +82,3 @@ return;

if (typeof args[reqConfIdx] === 'object') {
var reqCtx = args[reqConfIdx][contextKey] = args[reqConfIdx][contextKey] || {};
const reqCtx = args[reqConfIdx][contextKey] = args[reqConfIdx][contextKey] || {};
reqCtx.stack = new Error().stack;

@@ -88,0 +85,0 @@ }

{
"name": "axios-patch",
"version": "0.2.1",
"version": "0.2.2",
"description": "Better usage for axios",

@@ -5,0 +5,0 @@ "license": "MIT",

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