util-helpers 4.22.0 → 4.22.1
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/dist/util-helpers.js +9 -3
- package/dist/util-helpers.js.map +1 -1
- package/dist/util-helpers.min.js +1 -1
- package/dist/util-helpers.min.js.map +1 -1
- package/esm/AsyncMemo.js +2 -2
- package/esm/VERSION.js +1 -1
- package/esm/index.js +1 -1
- package/lib/AsyncMemo.js +1 -1
- package/lib/VERSION.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/types/AsyncMemo.d.ts +0 -1
package/dist/util-helpers.js
CHANGED
|
@@ -222,6 +222,12 @@
|
|
|
222
222
|
});
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
+
var idCounter = 0;
|
|
226
|
+
function uniqueId(prefix) {
|
|
227
|
+
var id = ++idCounter;
|
|
228
|
+
return toString(prefix) + id;
|
|
229
|
+
}
|
|
230
|
+
|
|
225
231
|
var reg$b = /^1[3456789]\d{9}$/;
|
|
226
232
|
function isMobile(value) {
|
|
227
233
|
var valueStr = toString(value);
|
|
@@ -2237,7 +2243,7 @@
|
|
|
2237
2243
|
return internalFindTreeSelect(tree, predicate, childrenField);
|
|
2238
2244
|
}
|
|
2239
2245
|
|
|
2240
|
-
var VERSION = "4.22.
|
|
2246
|
+
var VERSION = "4.22.1";
|
|
2241
2247
|
|
|
2242
2248
|
// 随机字符串
|
|
2243
2249
|
function randomString() {
|
|
@@ -2577,7 +2583,7 @@
|
|
|
2577
2583
|
var AsyncMemo = (function () {
|
|
2578
2584
|
function AsyncMemo(options) {
|
|
2579
2585
|
this.promiseCache = {};
|
|
2580
|
-
this.cache = new Cache('uh_async_memo', options);
|
|
2586
|
+
this.cache = new Cache(uniqueId('uh_async_memo'), options);
|
|
2581
2587
|
}
|
|
2582
2588
|
AsyncMemo.prototype.run = function (asyncFn, key, options) {
|
|
2583
2589
|
var _this = this;
|
|
@@ -2608,7 +2614,7 @@
|
|
|
2608
2614
|
return AsyncMemo;
|
|
2609
2615
|
}());
|
|
2610
2616
|
|
|
2611
|
-
var version = "4.22.
|
|
2617
|
+
var version = "4.22.1";
|
|
2612
2618
|
|
|
2613
2619
|
exports.AsyncMemo = AsyncMemo;
|
|
2614
2620
|
exports.VERSION = VERSION;
|