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