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

axios-interface

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

axios-interface - npm Package Compare versions

Comparing version 1.4.1 to 1.4.2

5

es/createFactory.js

@@ -47,3 +47,6 @@ /**

const config = combinedOnPending(params, combinedOptions);
return axios.request(config).then(handleResolve, handleReject);
const requestPromise = config instanceof Promise
? config.then(awaitedConfig => axios.request(awaitedConfig))
: axios.request(config);
return requestPromise.then(handleResolve, handleReject);
};

@@ -50,0 +53,0 @@ const { interpolate = /{(\w+)}/g } = defaultOptions;

2

es/types.d.ts

@@ -5,3 +5,3 @@ import { AxiosRequestConfig, AxiosResponse, AxiosError } from 'axios';

export declare type UrlTemplate = string;
export declare type OnPending = <TParams>(params: TParams, options: Options) => Options;
export declare type OnPending = <TParams>(params: TParams, options: Options) => Options | Promise<Options>;
export declare type OnResolve = <TParams>(response: AxiosResponse, params: TParams, options: Options) => any;

@@ -8,0 +8,0 @@ export declare type OnReject = <TParams>(response: AxiosError, params: TParams, options: Options) => any;

@@ -62,3 +62,6 @@ "use strict";

var config = combinedOnPending(params, combinedOptions);
return axios_1.default.request(config).then(handleResolve, handleReject);
var requestPromise = config instanceof Promise
? config.then(function (awaitedConfig) { return axios_1.default.request(awaitedConfig); })
: axios_1.default.request(config);
return requestPromise.then(handleResolve, handleReject);
};

@@ -65,0 +68,0 @@ var _a = defaultOptions.interpolate, interpolate = _a === void 0 ? /{(\w+)}/g : _a;

@@ -5,3 +5,3 @@ import { AxiosRequestConfig, AxiosResponse, AxiosError } from 'axios';

export declare type UrlTemplate = string;
export declare type OnPending = <TParams>(params: TParams, options: Options) => Options;
export declare type OnPending = <TParams>(params: TParams, options: Options) => Options | Promise<Options>;
export declare type OnResolve = <TParams>(response: AxiosResponse, params: TParams, options: Options) => any;

@@ -8,0 +8,0 @@ export declare type OnReject = <TParams>(response: AxiosError, params: TParams, options: Options) => any;

{
"name": "axios-interface",
"version": "1.4.1",
"version": "1.4.2",
"description": "create interface from axios",

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

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