mirror of
https://github.com/arthurfiorette/axios-cache-interceptor.git
synced 2025-12-08 17:36:16 +00:00
style: formatted code
This commit is contained in:
parent
59d40c9c8b
commit
71fbfab7de
@ -12,16 +12,16 @@
|
||||
|
||||
function createTemporaryCodeblock(textCode) {
|
||||
const element = document.createElement('pre');
|
||||
element.setAttribute('v-pre', true);
|
||||
element.setAttribute('data-lang', 'js');
|
||||
element.setAttribute('v-pre', true);
|
||||
element.setAttribute('data-lang', 'js');
|
||||
|
||||
const code = document.createElement('code');
|
||||
code.classList.add('lang-js');
|
||||
code.textContent = textCode;
|
||||
const code = document.createElement('code');
|
||||
code.classList.add('lang-js');
|
||||
code.textContent = textCode;
|
||||
|
||||
element.appendChild(code);
|
||||
element.appendChild(code);
|
||||
|
||||
return element;
|
||||
return element;
|
||||
}
|
||||
|
||||
loadScript('https://embed.runkit.com', function () {
|
||||
|
||||
@ -10,7 +10,8 @@ const axios = setupCache(axios, {
|
||||
|
||||
## `storage`
|
||||
|
||||
The storage used to save the cache. Defaults to a simple in-memory storage. [See more about storages](pages/storages).
|
||||
The storage used to save the cache. Defaults to a simple in-memory storage.
|
||||
[See more about storages](pages/storages).
|
||||
|
||||
## `generateKey`
|
||||
|
||||
@ -64,9 +65,8 @@ const myHeaderInterpreter: HeaderInterpreter = (headers) => {
|
||||
|
||||
## `request` and `response` Interceptors
|
||||
|
||||
These functions intercepts and modify the axios logic and objects. If you are using
|
||||
some sort of custom implementation, it is not guaranteed to any other documented thing
|
||||
work.
|
||||
These functions intercepts and modify the axios logic and objects. If you are using some
|
||||
sort of custom implementation, it is not guaranteed to any other documented thing work.
|
||||
|
||||
At this moment, you can see their code for more information
|
||||
[here](https://github.com/arthurfiorette/axios-cache-interceptor/tree/main/src/interceptors).
|
||||
|
||||
@ -70,10 +70,11 @@ import { setupCache } from 'https://cdn.jsdelivr.net/npm/axios-cache-interceptor
|
||||
|
||||
Below you can check what version of this package is supported by your version of axios.
|
||||
**But that does not mean that it won't work.**. Axios had many "breaking changes" made
|
||||
with type declarations. But remember, new features and bug fixes only comes with
|
||||
newer versions. Please keep your dependencies up to date <3.
|
||||
with type declarations. But remember, new features and bug fixes only comes with newer
|
||||
versions. Please keep your dependencies up to date <3.
|
||||
|
||||
> **Note**: Axios is not defined as a `peerDependency`, because it has a non-stable semver version (0.x.y).
|
||||
> **Note**: Axios is not defined as a `peerDependency`, because it has a non-stable semver
|
||||
> version (0.x.y).
|
||||
> [See #145 (Comment)](https://github.com/arthurfiorette/axios-cache-interceptor/issues/145#issuecomment-1042710481)
|
||||
|
||||
| [Axios Cache Interceptor](https://github.com/arthurfiorette/axios-cache-interceptor/releases) | [Axios](https://github.com/axios/axios/releases) |
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user