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/esm/AsyncMemo.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { __assign } from 'tslib';
2
2
  import { Cache } from 'cache2';
3
- import { isString } from 'ut2';
3
+ import { isString, uniqueId } from 'ut2';
4
4
 
5
5
  var AsyncMemo = (function () {
6
6
  function AsyncMemo(options) {
7
7
  this.promiseCache = {};
8
- this.cache = new Cache('uh_async_memo', options);
8
+ this.cache = new Cache(uniqueId('uh_async_memo'), options);
9
9
  }
10
10
  AsyncMemo.prototype.run = function (asyncFn, key, options) {
11
11
  var _this = this;
package/esm/VERSION.js CHANGED
@@ -1,4 +1,4 @@
1
- var VERSION = "4.22.0";
1
+ var VERSION = "4.22.1";
2
2
  var VERSION$1 = VERSION;
3
3
 
4
4
  export { VERSION$1 as default };
package/esm/index.js CHANGED
@@ -65,6 +65,6 @@ export { setDisableWarning } from './utils/config.js';
65
65
  export { default as VERSION } from './VERSION.js';
66
66
  export { default as AsyncMemo } from './AsyncMemo.js';
67
67
 
68
- var version = "4.22.0";
68
+ var version = "4.22.1";
69
69
 
70
70
  export { version };
package/lib/AsyncMemo.js CHANGED
@@ -7,7 +7,7 @@ var ut2 = require('ut2');
7
7
  var AsyncMemo = (function () {
8
8
  function AsyncMemo(options) {
9
9
  this.promiseCache = {};
10
- this.cache = new cache2.Cache('uh_async_memo', options);
10
+ this.cache = new cache2.Cache(ut2.uniqueId('uh_async_memo'), options);
11
11
  }
12
12
  AsyncMemo.prototype.run = function (asyncFn, key, options) {
13
13
  var _this = this;
package/lib/VERSION.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var VERSION = "4.22.0";
3
+ var VERSION = "4.22.1";
4
4
  var VERSION$1 = VERSION;
5
5
 
6
6
  module.exports = VERSION$1;
package/lib/index.js CHANGED
@@ -67,7 +67,7 @@ var config = require('./utils/config.js');
67
67
  var VERSION = require('./VERSION.js');
68
68
  var AsyncMemo = require('./AsyncMemo.js');
69
69
 
70
- exports.version = "4.22.0";
70
+ exports.version = "4.22.1";
71
71
 
72
72
  exports.isMobile = isMobile;
73
73
  exports.isTelephone = isTelephone;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "util-helpers",
3
- "version": "4.22.0",
3
+ "version": "4.22.1",
4
4
  "description": "一个基于业务场景的工具方法库",
5
5
  "main": "lib/index.js",
6
6
  "module": "esm/index.js",
@@ -7,7 +7,6 @@ import { Cache, CacheOptions } from 'cache2';
7
7
  * @param {Object} [options] 缓存配置项,更多配置项可参考 [`cache2`](https://www.npmjs.com/package/cache2)
8
8
  * @param {number} [options.max] 最大缓存数量
9
9
  * @param {'replaced' | 'limited'} [options.maxStrategy] 缓存策略
10
- * @param {string} [options.prefix] 缓存键前缀
11
10
  */
12
11
  declare class AsyncMemo<DataType = any> {
13
12
  private promiseCache;