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

axios-mock-shim

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

axios-mock-shim - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

5

dist/request.js

@@ -91,3 +91,3 @@ /* eslint-disable */

const { $instance, $options } = this;
const { beforeResponse, catchError } = $options;
const { beforeResponse } = $options;
if (!httpMethodList.has(method.toUpperCase()))

@@ -101,5 +101,4 @@ return warn('Invalid http method', method);

: 'data']: data,
}).then(beforeResponse ? beforeResponse : (res) => res)
.catch(catchError ? catchError : (err) => err);
}).then(beforeResponse ? beforeResponse : (res) => res);
},
};

2

package.json
{
"name": "axios-mock-shim",
"version": "1.0.3",
"version": "1.0.4",
"description": "A plugin build for easily using axios-mock-adapter with axios",

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

@@ -140,2 +140,16 @@ # Axios Mock Shim

### beforeResponse
You can specify what to do before getting the response, eg.
```js
const api = createAPIHandler(instance, {
useMock: true,
beforeResponse(res) {
return camelizeKeys(res.data);
},
});
```
### anyReply

@@ -142,0 +156,0 @@

@@ -16,3 +16,2 @@ export interface MockAdapterOptions {

beforeResponse?: Function;
catchError?: Function;
}

@@ -19,0 +18,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