cgserver 6.4.7 → 6.4.10
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.
|
@@ -33,7 +33,7 @@ class AsyncQueueItem {
|
|
|
33
33
|
}
|
|
34
34
|
class AsyncQueueTool {
|
|
35
35
|
//队列数据,一个key队列必须有先后
|
|
36
|
-
_queues;
|
|
36
|
+
_queues = {};
|
|
37
37
|
async add(key, func, thisArg = null, ...params) {
|
|
38
38
|
this._queues[key] = this._queues[key] || new AsyncQueueItem(key);
|
|
39
39
|
let error = await this._queues[key].add(func);
|
package/dist/lib/Logic/Log.js
CHANGED
|
@@ -78,15 +78,18 @@ class Log {
|
|
|
78
78
|
isString(param) {
|
|
79
79
|
return typeof (param) === "string";
|
|
80
80
|
}
|
|
81
|
+
isNumber(param) {
|
|
82
|
+
return typeof (param) === "number";
|
|
83
|
+
}
|
|
81
84
|
format = function (src, formatStr) {
|
|
82
|
-
if (
|
|
85
|
+
if (exports.GLog.isString(src)) {
|
|
83
86
|
let args = Array.prototype.slice.call(arguments, 1);
|
|
84
87
|
return src.replace(/\{(\d+)\}/g, function (m, i) {
|
|
85
88
|
return args[i];
|
|
86
89
|
});
|
|
87
90
|
}
|
|
88
91
|
else {
|
|
89
|
-
if (
|
|
92
|
+
if (exports.GLog.isNumber(src)) {
|
|
90
93
|
src = new Date(src);
|
|
91
94
|
}
|
|
92
95
|
let str = formatStr;
|