mm_redis 2.0.3 → 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/README.md +2 -2
- package/index.js +2 -8
- package/package.json +1 -1
- package/test.js +2 -2
package/README.md
CHANGED
|
@@ -7,8 +7,8 @@ mm_redis是一个高效的Redis客户端封装库,提供了全面的Redis功
|
|
|
7
7
|
|
|
8
8
|
## 版本信息
|
|
9
9
|
|
|
10
|
-
- **当前版本**: 2.0.
|
|
11
|
-
- **更新日期**: 2025-10-
|
|
10
|
+
- **当前版本**: 2.0.5
|
|
11
|
+
- **更新日期**: 2025-10-20
|
|
12
12
|
- **作者**: qww
|
|
13
13
|
- **NPM**: [https://www.npmjs.com/package/mm_redis](https://www.npmjs.com/package/mm_redis)
|
|
14
14
|
- **GitHub**: [https://gitee.com/qiuwenwu91/mm_redis](https://gitee.com/qiuwenwu91/mm_redis)
|
package/index.js
CHANGED
|
@@ -2557,12 +2557,6 @@ Redis.prototype._getConnection = function() {
|
|
|
2557
2557
|
});
|
|
2558
2558
|
};
|
|
2559
2559
|
|
|
2560
|
-
// 导出Redis类和redis_admin函数
|
|
2561
|
-
module.exports = {
|
|
2562
|
-
Redis: Redis,
|
|
2563
|
-
redis_admin: redis_admin
|
|
2564
|
-
};
|
|
2565
|
-
|
|
2566
2560
|
// 释放连接回池
|
|
2567
2561
|
Redis.prototype._releaseConnection = function(connection) {
|
|
2568
2562
|
try {
|
|
@@ -4170,7 +4164,7 @@ if (!$.pool.redis) {
|
|
|
4170
4164
|
* @param {Object} config 配置参数
|
|
4171
4165
|
* @return {Object} 返回一个Redis类实例
|
|
4172
4166
|
*/
|
|
4173
|
-
function
|
|
4167
|
+
function redisAdmin(scope, config) {
|
|
4174
4168
|
if (!scope) {
|
|
4175
4169
|
scope = 'sys';
|
|
4176
4170
|
}
|
|
@@ -4185,4 +4179,4 @@ function redis_admin(scope, config) {
|
|
|
4185
4179
|
/**
|
|
4186
4180
|
* @module 导出Redis管理器
|
|
4187
4181
|
*/
|
|
4188
|
-
exports.
|
|
4182
|
+
exports.redisAdmin = redisAdmin;
|
package/package.json
CHANGED
package/test.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const {
|
|
1
|
+
const { redisAdmin } = require('./index.js');
|
|
2
2
|
|
|
3
3
|
async function test() {
|
|
4
4
|
try {
|
|
5
5
|
var bl, num, arr = [];
|
|
6
6
|
var config = './config.json'.loadJson(__dirname);
|
|
7
|
-
var rs =
|
|
7
|
+
var rs = redisAdmin('sys', config);
|
|
8
8
|
await rs.open();
|
|
9
9
|
|
|
10
10
|
// 清理之前的测试数据
|