devix 0.0.23-beta.7 → 0.0.23-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cache/index.d.ts +24 -0
- package/package.json +2 -7
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare enum CacheType {
|
|
2
|
+
Local = 0,
|
|
3
|
+
Session = 1
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Encapsulate storage cache class
|
|
8
|
+
*
|
|
9
|
+
* @class StorageCache
|
|
10
|
+
* @template T
|
|
11
|
+
*/
|
|
12
|
+
declare class StorageCache<T = any> {
|
|
13
|
+
private storage;
|
|
14
|
+
constructor(type: CacheType);
|
|
15
|
+
getCache(key: string): T;
|
|
16
|
+
setCache(key: string, value: T): void;
|
|
17
|
+
updateCache(key: string, property: string, value: T): void;
|
|
18
|
+
deleteCache(key: string): void;
|
|
19
|
+
clearCache(): void;
|
|
20
|
+
}
|
|
21
|
+
declare const localCache: StorageCache<any>;
|
|
22
|
+
declare const sessionCache: StorageCache<any>;
|
|
23
|
+
|
|
24
|
+
export { localCache, sessionCache };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devix",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.23-beta.
|
|
4
|
+
"version": "0.0.23-beta.9",
|
|
5
5
|
"description": "Devix is a comprehensive, powerful, and compact JavaScript utility library.",
|
|
6
6
|
"author": "king-3 <w2196592083@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -28,11 +28,6 @@
|
|
|
28
28
|
"require": "./lib/**/index.js",
|
|
29
29
|
"import": "./lib/**/index.mjs"
|
|
30
30
|
},
|
|
31
|
-
"./lib/cache": {
|
|
32
|
-
"types": "./lib/cache/index.d.ts",
|
|
33
|
-
"require": "./lib/cache/index.js",
|
|
34
|
-
"import": "./lib/cache/index.mjs"
|
|
35
|
-
},
|
|
36
31
|
"./*": "./*"
|
|
37
32
|
},
|
|
38
33
|
"types": "./index.d.ts",
|
|
@@ -84,6 +79,6 @@
|
|
|
84
79
|
"version-bump-prompt": "^6.1.0"
|
|
85
80
|
},
|
|
86
81
|
"dependencies": {
|
|
87
|
-
"devix": "0.0.23-beta.
|
|
82
|
+
"devix": "0.0.23-beta.8"
|
|
88
83
|
}
|
|
89
84
|
}
|