sculp-js 1.8.1 → 1.8.3

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.
Files changed (63) hide show
  1. package/lib/cjs/array.js +2 -3
  2. package/lib/cjs/async.js +1 -1
  3. package/lib/cjs/base64.js +1 -1
  4. package/lib/cjs/clipboard.js +1 -1
  5. package/lib/cjs/cloneDeep.js +117 -0
  6. package/lib/cjs/cookie.js +1 -1
  7. package/lib/cjs/date.js +1 -1
  8. package/lib/cjs/dom.js +1 -1
  9. package/lib/cjs/download.js +1 -1
  10. package/lib/cjs/easing.js +1 -1
  11. package/lib/cjs/file.js +1 -1
  12. package/lib/cjs/func.js +1 -28
  13. package/lib/cjs/index.js +5 -3
  14. package/lib/cjs/isEqual.js +133 -0
  15. package/lib/cjs/math.js +1 -1
  16. package/lib/cjs/number.js +1 -1
  17. package/lib/cjs/object.js +1 -235
  18. package/lib/cjs/path.js +1 -1
  19. package/lib/cjs/qs.js +1 -1
  20. package/lib/cjs/random.js +1 -1
  21. package/lib/cjs/string.js +1 -1
  22. package/lib/cjs/tooltip.js +1 -1
  23. package/lib/cjs/tree.js +1 -1
  24. package/lib/cjs/type.js +1 -1
  25. package/lib/cjs/unique.js +1 -1
  26. package/lib/cjs/url.js +1 -1
  27. package/lib/cjs/validator.js +1 -1
  28. package/lib/cjs/variable.js +1 -1
  29. package/lib/cjs/watermark.js +1 -1
  30. package/lib/cjs/we-decode.js +1 -1
  31. package/lib/es/array.js +2 -3
  32. package/lib/es/async.js +1 -1
  33. package/lib/es/base64.js +1 -1
  34. package/lib/es/clipboard.js +1 -1
  35. package/lib/es/cloneDeep.js +115 -0
  36. package/lib/es/cookie.js +1 -1
  37. package/lib/es/date.js +1 -1
  38. package/lib/es/dom.js +1 -1
  39. package/lib/es/download.js +1 -1
  40. package/lib/es/easing.js +1 -1
  41. package/lib/es/file.js +1 -1
  42. package/lib/es/func.js +1 -28
  43. package/lib/es/index.js +4 -2
  44. package/lib/es/isEqual.js +131 -0
  45. package/lib/es/math.js +1 -1
  46. package/lib/es/number.js +1 -1
  47. package/lib/es/object.js +2 -234
  48. package/lib/es/path.js +1 -1
  49. package/lib/es/qs.js +1 -1
  50. package/lib/es/random.js +1 -1
  51. package/lib/es/string.js +1 -1
  52. package/lib/es/tooltip.js +1 -1
  53. package/lib/es/tree.js +1 -1
  54. package/lib/es/type.js +1 -1
  55. package/lib/es/unique.js +1 -1
  56. package/lib/es/url.js +1 -1
  57. package/lib/es/validator.js +1 -1
  58. package/lib/es/variable.js +1 -1
  59. package/lib/es/watermark.js +1 -1
  60. package/lib/es/we-decode.js +1 -1
  61. package/lib/index.d.ts +21 -19
  62. package/lib/umd/index.js +232 -262
  63. package/package.json +1 -1
@@ -0,0 +1,131 @@
1
+ /*!
2
+ * sculp-js v1.8.3
3
+ * (c) 2023-present chandq
4
+ * Released under the MIT License.
5
+ */
6
+
7
+ import { isObject } from './type.js';
8
+
9
+ /**
10
+ * 比较两值是否相等,适用所有数据类型
11
+ * @param {Comparable} a
12
+ * @param {Comparable} b
13
+ * @returns {boolean}
14
+ */
15
+ function isEqual(a, b) {
16
+ return deepEqual(a, b);
17
+ }
18
+ function deepEqual(a, b, compared = new WeakMap()) {
19
+ // 相同值快速返回
20
+ if (Object.is(a, b))
21
+ return true;
22
+ // 类型不同直接返回false
23
+ const typeA = Object.prototype.toString.call(a);
24
+ const typeB = Object.prototype.toString.call(b);
25
+ if (typeA !== typeB)
26
+ return false;
27
+ // 只缓存对象类型
28
+ if (isObject(a) && isObject(b)) {
29
+ if (compared.has(a))
30
+ return compared.get(a) === b;
31
+ compared.set(a, b);
32
+ compared.set(b, a);
33
+ }
34
+ // 处理特殊对象类型
35
+ switch (typeA) {
36
+ case '[object Date]':
37
+ return a.getTime() === b.getTime();
38
+ case '[object RegExp]':
39
+ return a.toString() === b.toString();
40
+ case '[object Map]':
41
+ return compareMap(a, b, compared);
42
+ case '[object Set]':
43
+ return compareSet(a, b, compared);
44
+ case '[object ArrayBuffer]':
45
+ return compareArrayBuffer(a, b);
46
+ case '[object DataView]':
47
+ return compareDataView(a, b, compared);
48
+ case '[object Int8Array]':
49
+ case '[object Uint8Array]':
50
+ case '[object Uint8ClampedArray]':
51
+ case '[object Int16Array]':
52
+ case '[object Uint16Array]':
53
+ case '[object Int32Array]':
54
+ case '[object Uint32Array]':
55
+ case '[object Float32Array]':
56
+ case '[object Float64Array]':
57
+ return compareTypedArray(a, b, compared);
58
+ case '[object Object]':
59
+ return compareObjects(a, b, compared);
60
+ case '[object Array]':
61
+ return compareArrays(a, b, compared);
62
+ }
63
+ return false;
64
+ }
65
+ // 辅助比较函数
66
+ function compareMap(a, b, compared) {
67
+ if (a.size !== b.size)
68
+ return false;
69
+ for (const [key, value] of a) {
70
+ if (!b.has(key) || !deepEqual(value, b.get(key), compared))
71
+ return false;
72
+ }
73
+ return true;
74
+ }
75
+ function compareSet(a, b, compared) {
76
+ if (a.size !== b.size)
77
+ return false;
78
+ for (const value of a) {
79
+ let found = false;
80
+ for (const bValue of b) {
81
+ if (deepEqual(value, bValue, compared)) {
82
+ found = true;
83
+ break;
84
+ }
85
+ }
86
+ if (!found)
87
+ return false;
88
+ }
89
+ return true;
90
+ }
91
+ function compareArrayBuffer(a, b) {
92
+ if (a.byteLength !== b.byteLength)
93
+ return false;
94
+ return new DataView(a).getInt32(0) === new DataView(b).getInt32(0);
95
+ }
96
+ function compareDataView(a, b, compared) {
97
+ return a.byteLength === b.byteLength && deepEqual(new Uint8Array(a.buffer), new Uint8Array(b.buffer), compared);
98
+ }
99
+ function compareTypedArray(a, b, compared) {
100
+ return a.byteLength === b.byteLength && deepEqual(Array.from(a), Array.from(b), compared);
101
+ }
102
+ function compareObjects(a, b, compared) {
103
+ const keysA = Reflect.ownKeys(a);
104
+ const keysB = Reflect.ownKeys(b);
105
+ if (keysA.length !== keysB.length)
106
+ return false;
107
+ for (const key of keysA) {
108
+ if (!keysB.includes(key))
109
+ return false;
110
+ if (!deepEqual(a[key], b[key], compared))
111
+ return false;
112
+ }
113
+ // 原型链比较
114
+ return Object.getPrototypeOf(a) === Object.getPrototypeOf(b);
115
+ }
116
+ function compareArrays(a, b, compared) {
117
+ // 增加有效索引检查
118
+ const keysA = Object.keys(a).map(Number);
119
+ const keysB = Object.keys(b).map(Number);
120
+ if (keysA.length !== keysB.length)
121
+ return false;
122
+ // 递归比较每个元素
123
+ for (let i = 0, len = a.length; i < len; i++) {
124
+ if (!deepEqual(a[i], b[i], compared))
125
+ return false;
126
+ }
127
+ // 比较数组对象的其他属性
128
+ return compareObjects(a, b, compared);
129
+ }
130
+
131
+ export { isEqual };
package/lib/es/math.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.8.1
2
+ * sculp-js v1.8.3
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
package/lib/es/number.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.8.1
2
+ * sculp-js v1.8.3
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
package/lib/es/object.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.8.1
2
+ * sculp-js v1.8.3
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -58,7 +58,6 @@ function objectMap(obj, iterator) {
58
58
  for (const key in obj) {
59
59
  if (!objectHas(obj, key))
60
60
  continue;
61
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
62
61
  obj2[key] = iterator(obj[key], key);
63
62
  }
64
63
  return obj2;
@@ -73,7 +72,6 @@ function objectPick(obj, keys) {
73
72
  const obj2 = {};
74
73
  objectEach(obj, (v, k) => {
75
74
  if (keys.includes(k)) {
76
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
77
75
  // @ts-ignore
78
76
  obj2[k] = v;
79
77
  }
@@ -90,7 +88,6 @@ function objectOmit(obj, keys) {
90
88
  const obj2 = {};
91
89
  objectEach(obj, (v, k) => {
92
90
  if (!keys.includes(k)) {
93
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
94
91
  // @ts-ignore
95
92
  obj2[k] = v;
96
93
  }
@@ -143,7 +140,6 @@ function objectAssign(source, ...targets) {
143
140
  const map = new Map();
144
141
  for (let i = 0, len = targets.length; i < len; i++) {
145
142
  const target = targets[i];
146
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
147
143
  // @ts-ignore
148
144
  source = merge(map, source, target);
149
145
  }
@@ -201,233 +197,5 @@ function objectGet(obj, path, strict = false) {
201
197
  v: tempObj ? tempObj[keyArr[i]] : undefined
202
198
  };
203
199
  }
204
- /**
205
- * 深拷贝堪称完全体 即:任何类型的数据都会被深拷贝
206
- *
207
- * 包含对null、原始值、对象循环引用的处理
208
- *
209
- * 对Map、Set、ArrayBuffer、Date、RegExp、Array、Object及原型链属性方法执行深拷贝
210
- * @param {T} source
211
- * @param {WeakMap} map
212
- * @returns {T}
213
- */
214
- function cloneDeep(source, map = new WeakMap()) {
215
- // 处理原始类型和 null/undefined
216
- if (source === null || typeof source !== 'object') {
217
- return source;
218
- }
219
- // 处理循环引用
220
- if (map.has(source)) {
221
- return map.get(source);
222
- }
223
- // 处理 ArrayBuffer
224
- if (source instanceof ArrayBuffer) {
225
- const copy = new ArrayBuffer(source.byteLength);
226
- new Uint8Array(copy).set(new Uint8Array(source));
227
- map.set(source, copy);
228
- return copy;
229
- }
230
- // 处理 DataView 和 TypedArray (Uint8Array 等)
231
- if (ArrayBuffer.isView(source)) {
232
- const constructor = source.constructor;
233
- const bufferCopy = cloneDeep(source.buffer, map);
234
- return new constructor(bufferCopy, source.byteOffset, source.length);
235
- }
236
- // 处理 Date 对象
237
- if (source instanceof Date) {
238
- const copy = new Date(source.getTime());
239
- map.set(source, copy);
240
- return copy;
241
- }
242
- // 处理 RegExp 对象
243
- if (source instanceof RegExp) {
244
- const copy = new RegExp(source.source, source.flags);
245
- copy.lastIndex = source.lastIndex; // 保留匹配状态
246
- map.set(source, copy);
247
- return copy;
248
- }
249
- // 处理 Map
250
- if (source instanceof Map) {
251
- const copy = new Map();
252
- map.set(source, copy);
253
- source.forEach((value, key) => {
254
- copy.set(cloneDeep(key, map), cloneDeep(value, map));
255
- });
256
- return copy;
257
- }
258
- // 处理 Set
259
- if (source instanceof Set) {
260
- const copy = new Set();
261
- map.set(source, copy);
262
- source.forEach(value => {
263
- copy.add(cloneDeep(value, map));
264
- });
265
- return copy;
266
- }
267
- // 处理数组 (包含稀疏数组)
268
- if (Array.isArray(source)) {
269
- const copy = new Array(source.length);
270
- map.set(source, copy);
271
- // 克隆所有有效索引
272
- for (let i = 0, len = source.length; i < len; i++) {
273
- if (i in source) {
274
- // 保留空位
275
- copy[i] = cloneDeep(source[i], map);
276
- }
277
- }
278
- // 克隆数组的自定义属性
279
- const descriptors = Object.getOwnPropertyDescriptors(source);
280
- for (const key of Reflect.ownKeys(descriptors)) {
281
- Object.defineProperty(copy, key, {
282
- ...descriptors[key],
283
- value: cloneDeep(descriptors[key].value, map)
284
- });
285
- }
286
- return copy;
287
- }
288
- // 处理普通对象和类实例
289
- const copy = Object.create(Object.getPrototypeOf(source));
290
- map.set(source, copy);
291
- const descriptors = Object.getOwnPropertyDescriptors(source);
292
- for (const key of Reflect.ownKeys(descriptors)) {
293
- const descriptor = descriptors[key];
294
- if ('value' in descriptor) {
295
- // 克隆数据属性
296
- descriptor.value = cloneDeep(descriptor.value, map);
297
- }
298
- else {
299
- // 处理访问器属性 (getter/setter)
300
- if (descriptor.get) {
301
- descriptor.get = cloneDeep(descriptor.get, map);
302
- }
303
- if (descriptor.set) {
304
- descriptor.set = cloneDeep(descriptor.set, map);
305
- }
306
- }
307
- Object.defineProperty(copy, key, descriptor);
308
- }
309
- return copy;
310
- }
311
- /**
312
- * 比较两值是否相等,适用所有数据类型
313
- * @param {Comparable} a
314
- * @param {Comparable} b
315
- * @returns {boolean}
316
- */
317
- function isEqual(a, b) {
318
- return deepEqual(a, b);
319
- }
320
- function deepEqual(a, b, compared = new WeakMap()) {
321
- // 相同值快速返回
322
- if (Object.is(a, b))
323
- return true;
324
- // 类型不同直接返回false
325
- const typeA = Object.prototype.toString.call(a);
326
- const typeB = Object.prototype.toString.call(b);
327
- if (typeA !== typeB)
328
- return false;
329
- // 只缓存对象类型
330
- if (isObject(a) && isObject(b)) {
331
- if (compared.has(a))
332
- return compared.get(a) === b;
333
- compared.set(a, b);
334
- compared.set(b, a);
335
- }
336
- // 处理特殊对象类型
337
- switch (typeA) {
338
- case '[object Date]':
339
- return a.getTime() === b.getTime();
340
- case '[object RegExp]':
341
- return a.toString() === b.toString();
342
- case '[object Map]':
343
- return compareMap(a, b, compared);
344
- case '[object Set]':
345
- return compareSet(a, b, compared);
346
- case '[object ArrayBuffer]':
347
- return compareArrayBuffer(a, b);
348
- case '[object DataView]':
349
- return compareDataView(a, b, compared);
350
- case '[object Int8Array]':
351
- case '[object Uint8Array]':
352
- case '[object Uint8ClampedArray]':
353
- case '[object Int16Array]':
354
- case '[object Uint16Array]':
355
- case '[object Int32Array]':
356
- case '[object Uint32Array]':
357
- case '[object Float32Array]':
358
- case '[object Float64Array]':
359
- return compareTypedArray(a, b, compared);
360
- case '[object Object]':
361
- return compareObjects(a, b, compared);
362
- case '[object Array]':
363
- return compareArrays(a, b, compared);
364
- }
365
- return false;
366
- }
367
- // 辅助比较函数
368
- function compareMap(a, b, compared) {
369
- if (a.size !== b.size)
370
- return false;
371
- for (const [key, value] of a) {
372
- if (!b.has(key) || !deepEqual(value, b.get(key), compared))
373
- return false;
374
- }
375
- return true;
376
- }
377
- function compareSet(a, b, compared) {
378
- if (a.size !== b.size)
379
- return false;
380
- for (const value of a) {
381
- let found = false;
382
- for (const bValue of b) {
383
- if (deepEqual(value, bValue, compared)) {
384
- found = true;
385
- break;
386
- }
387
- }
388
- if (!found)
389
- return false;
390
- }
391
- return true;
392
- }
393
- function compareArrayBuffer(a, b) {
394
- if (a.byteLength !== b.byteLength)
395
- return false;
396
- return new DataView(a).getInt32(0) === new DataView(b).getInt32(0);
397
- }
398
- function compareDataView(a, b, compared) {
399
- return a.byteLength === b.byteLength && deepEqual(new Uint8Array(a.buffer), new Uint8Array(b.buffer), compared);
400
- }
401
- function compareTypedArray(a, b, compared) {
402
- return a.byteLength === b.byteLength && deepEqual(Array.from(a), Array.from(b), compared);
403
- }
404
- function compareObjects(a, b, compared) {
405
- const keysA = Reflect.ownKeys(a);
406
- const keysB = Reflect.ownKeys(b);
407
- if (keysA.length !== keysB.length)
408
- return false;
409
- for (const key of keysA) {
410
- if (!keysB.includes(key))
411
- return false;
412
- if (!deepEqual(a[key], b[key], compared))
413
- return false;
414
- }
415
- // 原型链比较
416
- return Object.getPrototypeOf(a) === Object.getPrototypeOf(b);
417
- }
418
- function compareArrays(a, b, compared) {
419
- // 增加有效索引检查
420
- const keysA = Object.keys(a).map(Number);
421
- const keysB = Object.keys(b).map(Number);
422
- if (keysA.length !== keysB.length)
423
- return false;
424
- // 递归比较每个元素
425
- for (let i = 0, len = a.length; i < len; i++) {
426
- if (!deepEqual(a[i], b[i], compared))
427
- return false;
428
- }
429
- // 比较数组对象的其他属性
430
- return compareObjects(a, b, compared);
431
- }
432
200
 
433
- export { cloneDeep, isEqual, isPlainObject, objectAssign, objectEach, objectEachAsync, objectFill, objectGet, objectMap, objectAssign as objectMerge, objectOmit, objectPick };
201
+ export { isPlainObject, objectAssign, objectEach, objectEachAsync, objectFill, objectGet, objectMap, objectAssign as objectMerge, objectOmit, objectPick };
package/lib/es/path.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.8.1
2
+ * sculp-js v1.8.3
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
package/lib/es/qs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.8.1
2
+ * sculp-js v1.8.3
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
package/lib/es/random.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.8.1
2
+ * sculp-js v1.8.3
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
package/lib/es/string.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.8.1
2
+ * sculp-js v1.8.3
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
package/lib/es/tooltip.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.8.1
2
+ * sculp-js v1.8.3
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
package/lib/es/tree.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.8.1
2
+ * sculp-js v1.8.3
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
package/lib/es/type.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.8.1
2
+ * sculp-js v1.8.3
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
package/lib/es/unique.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.8.1
2
+ * sculp-js v1.8.3
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
package/lib/es/url.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.8.1
2
+ * sculp-js v1.8.3
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.8.1
2
+ * sculp-js v1.8.3
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.8.1
2
+ * sculp-js v1.8.3
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.8.1
2
+ * sculp-js v1.8.3
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.8.1
2
+ * sculp-js v1.8.3
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
package/lib/index.d.ts CHANGED
@@ -417,25 +417,6 @@ declare function objectGet(obj: AnyObject, path: string, strict?: boolean): {
417
417
  k: string | undefined;
418
418
  v: any | undefined;
419
419
  };
420
- /**
421
- * 深拷贝堪称完全体 即:任何类型的数据都会被深拷贝
422
- *
423
- * 包含对null、原始值、对象循环引用的处理
424
- *
425
- * 对Map、Set、ArrayBuffer、Date、RegExp、Array、Object及原型链属性方法执行深拷贝
426
- * @param {T} source
427
- * @param {WeakMap} map
428
- * @returns {T}
429
- */
430
- declare function cloneDeep<T>(source: T, map?: WeakMap<any, any>): T;
431
- type Comparable = null | undefined | boolean | number | string | Date | RegExp | Map<any, any> | Set<any> | ArrayBuffer | object | Array<any>;
432
- /**
433
- * 比较两值是否相等,适用所有数据类型
434
- * @param {Comparable} a
435
- * @param {Comparable} b
436
- * @returns {boolean}
437
- */
438
- declare function isEqual(a: Comparable, b: Comparable): boolean;
439
420
 
440
421
  /**
441
422
  * 标准化路径
@@ -1055,4 +1036,25 @@ declare function replaceVarFromString(sourceStr: string, targetObj: Record<strin
1055
1036
  */
1056
1037
  declare function executeInScope(code: string, scope?: Record<string, any>): any;
1057
1038
 
1039
+ /**
1040
+ * 深拷贝堪称完全体 即:任何类型的数据都会被深拷贝
1041
+ *
1042
+ * 包含对null、原始值、对象循环引用的处理
1043
+ *
1044
+ * 对Map、Set、ArrayBuffer、Date、RegExp、Array、Object及原型链属性方法执行深拷贝
1045
+ * @param {T} source
1046
+ * @param {WeakMap} map
1047
+ * @returns {T}
1048
+ */
1049
+ declare function cloneDeep<T>(source: T, map?: WeakMap<any, any>): T;
1050
+
1051
+ type Comparable = null | undefined | boolean | number | string | Date | RegExp | Map<any, any> | Set<any> | ArrayBuffer | object | Array<any>;
1052
+ /**
1053
+ * 比较两值是否相等,适用所有数据类型
1054
+ * @param {Comparable} a
1055
+ * @param {Comparable} b
1056
+ * @returns {boolean}
1057
+ */
1058
+ declare function isEqual(a: Comparable, b: Comparable): boolean;
1059
+
1058
1060
  export { type AnyArray, type AnyFunc, type AnyObject, type ArrayElements, type Comparable, type DateObj, type DateValue, type DebounceFunc, EMAIL_REGEX, type FileType, HEX_POOL, HTTP_URL_REGEX, type ICanvasWM, type ICompressOptions, type IFieldOptions, type IFilterCondition, IPV4_REGEX, IPV6_REGEX, type ISearchTreeOpts, type ITreeConf, type IdLike, type LooseParamValue, type LooseParams, type ObjectAssignItem, type OnceFunc, PHONE_REGEX, type Params, type PartialDeep, type RandomString, type Replacer, STRING_ARABIC_NUMERALS, STRING_LOWERCASE_ALPHA, STRING_POOL, STRING_UPPERCASE_ALPHA, type SetStyle, type SmoothScrollOptions, type Style, type ThrottleFunc, UNIQUE_NUMBER_SAFE_LENGTH, URL_REGEX, type UniqueString, type Url, add, addClass, arrayEach, arrayEachAsync, arrayInsertBefore, arrayLike, arrayRemove, asyncMap, calculateDate, calculateDateTime, chooseLocalFile, cloneDeep, compressImg, cookieDel, cookieGet, cookieSet, copyText, crossOriginDownload, dateParse, dateToEnd, dateToStart, debounce, decodeFromBase64, divide, downloadBlob, downloadData, downloadHref, downloadURL, encodeToBase64, escapeRegExp, executeInScope, flatTree, forEachDeep, formatDate, formatNumber, formatTree, fuzzySearchTree, genCanvasWM, getComputedCssVal, getGlobal, getStrWidthPx, getStyle, hasClass, isArray, isBigInt, isBoolean, isDate, isDigit, isEmail, isEmpty, isEqual, isError, isFloat, isFunction, isIdNo, isInteger, isIpV4, isIpV6, isJsonString, isNaN, isNull, isNullOrUnDef, isNullOrUnDef as isNullish, isNumber, isNumerical, isObject, isPhone, isPlainObject, isPrimitive, isRegExp, isString, isSymbol, isUndefined, isUrl, isValidDate, mapDeep, multiply, numberAbbr, numberToHex, objectAssign, objectEach, objectEachAsync, objectFill, objectGet, objectHas, objectMap, objectAssign as objectMerge, objectOmit, objectPick, once, parseQueryParams, parseVarFromString, pathJoin, pathNormalize, qsParse, qsStringify, randomNumber, randomString, randomUuid, removeClass, replaceVarFromString, searchTreeById, setGlobal, setStyle, smoothScroll, stringAssign, stringCamelCase, stringEscapeHtml, stringFill, stringFormat, stringKebabCase, strip, subtract, supportCanvas, throttle, tooltipEvent, typeIs, uniqueNumber, uniqueString, uniqueSymbol, urlDelParams, urlParse, urlSetParams, urlStringify, wait, weAtob, weBtoa };