mirror of
https://github.com/arthurfiorette/axios-cache-interceptor.git
synced 2025-12-08 17:36:16 +00:00
style: prettified code
This commit is contained in:
parent
e34bfdd92b
commit
3c38985113
@ -317,10 +317,11 @@ can use them too.
|
||||
|
||||
### Url Imports
|
||||
|
||||
For those who wants to import this package as a http url, the `index.es2020.min.js` is for you.
|
||||
For those who wants to import this package as a http url, the `index.es2020.min.js` is for
|
||||
you.
|
||||
|
||||
```ts
|
||||
import { setupCache } from 'https://cdn.jsdelivr.net/npm/axios-cache-interceptor@latest/dist/index.es2020.min.js'
|
||||
import { setupCache } from 'https://cdn.jsdelivr.net/npm/axios-cache-interceptor@latest/dist/index.es2020.min.js';
|
||||
```
|
||||
|
||||
### Browsers
|
||||
@ -454,7 +455,8 @@ needed) cache data. There are two simple ones that comes by default:
|
||||
|
||||
Both of them are included in all bundles.
|
||||
|
||||
You can create your own storage by using the `buildStorage` function. Take a look at this example with [NodeRedis](https://github.com/redis/node-redis) v4.
|
||||
You can create your own storage by using the `buildStorage` function. Take a look at this
|
||||
example with [NodeRedis](https://github.com/redis/node-redis) v4.
|
||||
|
||||
```js
|
||||
import { createClient } from 'redis'; // 4.0.1
|
||||
|
||||
@ -3,9 +3,7 @@ import type { AxiosStorage, StaleStorageValue } from './types';
|
||||
|
||||
const storage = Symbol();
|
||||
|
||||
/**
|
||||
* Returns true if the provided object was created from {@link buildStorage} function.
|
||||
*/
|
||||
/** Returns true if the provided object was created from {@link buildStorage} function. */
|
||||
export const isStorage = (obj: any): obj is AxiosStorage => !!obj && !!obj[storage];
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user