@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.umd.js CHANGED
@@ -4322,13 +4322,25 @@
4322
4322
  * 获取字典所有的键
4323
4323
  */
4324
4324
  keys() {
4325
- return Array.from(this.items.keys());
4325
+ const keys = this.items.keys();
4326
+ if (typeof keys.toArray === "function") {
4327
+ return keys.toArray();
4328
+ }
4329
+ else {
4330
+ return [...keys];
4331
+ }
4326
4332
  }
4327
4333
  /**
4328
4334
  * 返回字典中的所有值
4329
4335
  */
4330
4336
  values() {
4331
- return Array.from(this.items.values());
4337
+ const values = this.items.values();
4338
+ if (typeof values.toArray === "function") {
4339
+ return values.toArray();
4340
+ }
4341
+ else {
4342
+ return [...values];
4343
+ }
4332
4344
  }
4333
4345
  /**
4334
4346
  * 清空字典
@@ -5505,7 +5517,7 @@
5505
5517
  }
5506
5518
  const domUtils = new DOMUtils();
5507
5519
 
5508
- const version = "2.9.8";
5520
+ const version = "2.9.9";
5509
5521
 
5510
5522
  class Utils {
5511
5523
  windowApi;