@whitesev/utils 2.9.8 → 2.9.9

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/index.esm.js CHANGED
@@ -4316,13 +4316,25 @@ class UtilsDictionary {
4316
4316
  * 获取字典所有的键
4317
4317
  */
4318
4318
  keys() {
4319
- return Array.from(this.items.keys());
4319
+ const keys = this.items.keys();
4320
+ if (typeof keys.toArray === "function") {
4321
+ return keys.toArray();
4322
+ }
4323
+ else {
4324
+ return [...keys];
4325
+ }
4320
4326
  }
4321
4327
  /**
4322
4328
  * 返回字典中的所有值
4323
4329
  */
4324
4330
  values() {
4325
- return Array.from(this.items.values());
4331
+ const values = this.items.values();
4332
+ if (typeof values.toArray === "function") {
4333
+ return values.toArray();
4334
+ }
4335
+ else {
4336
+ return [...values];
4337
+ }
4326
4338
  }
4327
4339
  /**
4328
4340
  * 清空字典
@@ -5499,7 +5511,7 @@ class DOMUtils {
5499
5511
  }
5500
5512
  const domUtils = new DOMUtils();
5501
5513
 
5502
- const version = "2.9.8";
5514
+ const version = "2.9.9";
5503
5515
 
5504
5516
  class Utils {
5505
5517
  windowApi;