mm_cachebase 2.0.4 → 2.0.5
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/example/index.js +53 -0
- package/index.js +9 -3156
- package/lib/cachebase.js +3125 -0
- package/package.json +8 -2
- package/test.js +13 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mm_cachebase",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
4
4
|
"description": "一个轻量级的本地缓存类库,接口与 mm_redis 完全对齐:全异步API、冒号风格事件、统一签名与返回值,支持字符串、哈希、列表、集合、有序集合、发布订阅。",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
"url": "git+https://gitee.com/qiuwenwu91/mm_cachebase.git"
|
|
12
12
|
},
|
|
13
13
|
"keywords": [
|
|
14
|
+
"mm_mod",
|
|
15
|
+
"mm_port",
|
|
16
|
+
"mm_cache",
|
|
14
17
|
"cachebase",
|
|
15
18
|
"redis",
|
|
16
19
|
"cache",
|
|
@@ -32,6 +35,8 @@
|
|
|
32
35
|
"persist",
|
|
33
36
|
"scope"
|
|
34
37
|
],
|
|
38
|
+
"layer": "port",
|
|
39
|
+
"group": "cache",
|
|
35
40
|
"author": "邱文武",
|
|
36
41
|
"license": "MIT",
|
|
37
42
|
"bugs": {
|
|
@@ -39,6 +44,7 @@
|
|
|
39
44
|
},
|
|
40
45
|
"homepage": "https://gitee.com/qiuwenwu91/mm_cachebase#readme",
|
|
41
46
|
"dependencies": {
|
|
42
|
-
"
|
|
47
|
+
"mm_corejs": "^1.1.5",
|
|
48
|
+
"mm_helper": "^1.0.1"
|
|
43
49
|
}
|
|
44
50
|
}
|
package/test.js
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
// 独立运行时补充全局 $ 对象(mm_os 宿主环境已提供,npm 包测试需自备)
|
|
2
|
+
if (!global.$) {
|
|
3
|
+
global.$ = {
|
|
4
|
+
log: {
|
|
5
|
+
debug: console.debug ? console.debug.bind(console) : console.log.bind(console),
|
|
6
|
+
info: console.info ? console.info.bind(console) : console.log.bind(console),
|
|
7
|
+
warn: console.warn ? console.warn.bind(console) : console.log.bind(console),
|
|
8
|
+
error: console.error ? console.error.bind(console) : console.log.bind(console),
|
|
9
|
+
success: console.log.bind(console)
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
|
|
1
14
|
const assert = require('assert');
|
|
2
15
|
const { CacheBase, cachebaseAdmin } = require('./index.js');
|
|
3
16
|
|