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

axios-cache-interceptor

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

axios-cache-interceptor - npm Package Compare versions

Comparing version 0.2.5 to 0.2.6

11

dist/axios/cache.d.ts

@@ -14,7 +14,10 @@ import { AxiosInstance, AxiosRequestConfig } from 'axios';

*
* @param config The config for the caching interceptors
* @param axiosConfig The config for the created axios instance
* @returns The same instance but with caching enabled
* @param config The config for the caching interceptors and the axios instance
* @returns A new AxiosCacheInstance with caching enabled
*/
export declare function createCache(config?: Partial<CacheInstance> & Partial<CacheProperties>, axiosConfig?: AxiosRequestConfig): AxiosCacheInstance;
export declare function createCache({ axios, cache }?: CreateCacheOptions): AxiosCacheInstance;
export declare type CreateCacheOptions = {
axios?: Partial<AxiosRequestConfig>;
cache?: Partial<CacheInstance> & Partial<CacheProperties>;
};
//# sourceMappingURL=cache.d.ts.map

@@ -53,10 +53,9 @@ "use strict";

*
* @param config The config for the caching interceptors
* @param axiosConfig The config for the created axios instance
* @returns The same instance but with caching enabled
* @param config The config for the caching interceptors and the axios instance
* @returns A new AxiosCacheInstance with caching enabled
*/
function createCache(config = {}, axiosConfig = {}) {
return applyCache(axios_1.default.create(axiosConfig), config);
function createCache({ axios = {}, cache = {} } = {}) {
return applyCache(axios_1.default.create(axios), cache);
}
exports.createCache = createCache;
//# sourceMappingURL=cache.js.map
{
"name": "axios-cache-interceptor",
"version": "0.2.5",
"version": "0.2.6",
"description": "Cache interceptor for axios",

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

@@ -64,11 +64,15 @@ import Axios, { AxiosInstance, AxiosRequestConfig } from 'axios';

*
* @param config The config for the caching interceptors
* @param axiosConfig The config for the created axios instance
* @returns The same instance but with caching enabled
* @param config The config for the caching interceptors and the axios instance
* @returns A new AxiosCacheInstance with caching enabled
*/
export function createCache(
config: Partial<CacheInstance> & Partial<CacheProperties> = {},
axiosConfig: AxiosRequestConfig = {}
): AxiosCacheInstance {
return applyCache(Axios.create(axiosConfig), config);
export function createCache({
axios = {},
cache = {}
}: CreateCacheOptions = {}): AxiosCacheInstance {
return applyCache(Axios.create(axios), cache);
}
export type CreateCacheOptions = {
axios?: Partial<AxiosRequestConfig>;
cache?: Partial<CacheInstance> & Partial<CacheProperties>;
};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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